]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
More DHCP Fixes.
authorArne Fitzenreiter <arne_f@ipfire.org>
Tue, 5 Jan 2010 14:25:18 +0000 (15:25 +0100)
committerArne Fitzenreiter <arne_f@ipfire.org>
Tue, 5 Jan 2010 14:26:29 +0000 (15:26 +0100)
src/initscripts/init.d/networking/dhcpcd.exe
src/initscripts/init.d/networking/red

index d0e6599c35d9727e393fc55cdd885fa4713edc4e..d69f53d0b43d5bcdb58999467c14cca8769c1d68 100644 (file)
@@ -14,6 +14,8 @@
 . /etc/sysconfig/rc
 . $rc_functions
 
+
+eval $(/usr/local/bin/readhash /var/ipfire/ethernet/settings)
 eval $(/usr/local/bin/readhash /var/ipfire/dns/settings)
 
 dhcpcd_up()
@@ -21,8 +23,8 @@ dhcpcd_up()
        set | grep "^new_" | sed "s|^new_||g" | \
        sort > /var/ipfire/dhcpc/dhcpcd-$interface.info
 
-       # If interface is not red0.8 (vdsl-iptv) update /var/ipfire/red
-       if [ "$interface" != "red0.8" ]; then
+       # Only if RED_TYPE=DHCP update /var/ipfire/red
+       if [ "$RED_TYPE" == "DHCP" ]; then
 
                #Check if we have to restart the services at update
                [ ! -e "/var/ipfire/red/active" ] update=1;
@@ -68,7 +70,9 @@ dhcpcd_down()
 {
        set | grep "^new_" | sed "s|^new_||g" | \
        sort > /var/ipfire/dhcpc/dhcpcd-$interface.info
-       if [ "$interface" != "red0.8" ]; then
+
+       # Only if RED_TYPE=DHCP update /var/ipfire/red
+       if [ "$RED_TYPE" == "DHCP" ]; then
                logger -p local0.info -t dhcpcd.exe[$$] "${interface} has been brought down"
                rm -f /var/ipfire/red/active
                run_subdir ${rc_base}/init.d/networking/red.down/
index ac6cec04033cd39ee8ef870dbabb75feaad81ee6..f60c0d1591154b5274f77e965f28772fbffdf7d4 100644 (file)
@@ -249,9 +249,6 @@ case "${1}" in
                                if [ "${RED_VDSL_IPTV_DISABLE}" == "0" ]; then
                                        PIDFILE="/var/run/dhcpcd-${DEVICE}.${RED_VDSL_IPTV_VLAN}.pid"
                                        LEASEINFO="/var/ipfire/dhcpc/dhcpcd-${DEVICE}.${RED_VDSL_IPTV_VLAN}.info"
-                                       # Don't startup services ...
-                                       DHCP_START="-C 70 "
-                                       DHCP_STOP="-k "
                                        # Test to see if there is a stale pid file
                                        if [ -f "$PIDFILE" ]; then
                                                ps `cat "$PIDFILE"` | grep dhcpcd > /dev/null
@@ -320,10 +317,6 @@ case "${1}" in
                                ip addr flush dev $PPP_NIC >/dev/null 2>&1
                                if [ "$TYPE" == "pptp" ]; then
                                        if [ "$PPTP_NICCFG" == "dhcp" ]; then
-                                               # Don't startup services ...
-                                               DHCP_START="-C 70 "
-                                               DHCP_STOP="-k "
-
                                                # Test to see if there is a stale pid file
                                                if [ -f "$PIDFILE" ]; then
                                                        ps `cat "$PIDFILE"` | grep dhcpcd > /dev/null