/[pkgs]/devel/dhcp/10-dhclient
ViewVC logotype

Contents of /devel/dhcp/10-dhclient

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Wed Aug 12 21:04:26 2009 UTC (3 months, 1 week ago) by dcantrel
Branch: MAIN
CVS Tags: dhcp-4_1_0p1-12_fc13, dhcp-4_1_0p1-5_fc12, dhcp-4_1_0p1-10_fc12, dhcp-4_1_0p1-3_fc12, dhcp-4_1_0p1-9_fc12, dhcp-4_1_0p1-6_fc12, dhcp-4_1_0p1-7_fc12, dhcp-4_1_0p1-13_fc13, dhcp-4_1_0p1-14_fc13, dhcp-4_1_0p1-4_fc12, F-12-split, dhcp-4_1_0p1-11_fc12, dhcp-4_1_0p1-8_fc12, HEAD
Changes since 1.1: +5 -1 lines
* Wed Aug 12 2009 David Cantrell <dcantrell@redhat.com> - 12:4.1.0p1-3
- Update NetworkManager dispatcher script to remove case conversion
  and source /etc/sysconfig/network
1 #!/bin/bash
2 # run dhclient.d scripts in an emulated environment
3
4 PATH=/bin:/usr/bin:/sbin
5 SAVEDIR=/var/lib/dhclient
6 ETCDIR=/etc/dhcp
7 interface=$1
8
9 eval "$(
10 declare | LC_ALL=C grep '^DHCP4_[A-Z_]*=' | while read opt; do
11 optname=${opt%%=*}
12 optname=${optname,,}
13 optname=new_${optname#dhcp4_}
14 optvalue=${opt#*=}
15 echo "$optname=$optvalue"
16 done
17 )"
18
19 [ -f /etc/sysconfig/network ] && . /etc/sysconfig/network
20
21 [ -f /etc/sysconfig/network-scripts/ifcfg-$interface ] && \
22 . /etc/sysconfig/network-scripts/ifcfg-$interface
23
24 if [ -d $ETCDIR/dhclient.d ]; then
25 for f in $ETCDIR/dhclient.d/*.sh; do
26 if [ -x $f ]; then
27 subsystem="${f%.sh}"
28 subsystem="${subsystem##*/}"
29 . ${f}
30 if [ "$2" = "up" ]; then
31 "${subsystem}_config"
32 elif [ "$2" = "down" ]; then
33 "${subsystem}_restore"
34 fi
35 fi
36 done
37 fi

admin@fedoraproject.org
ViewVC Help
Powered by ViewVC 1.1.2