]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blobdiff - src/initscripts/init.d/networking/red
Wieder einmal die Netzwerkscripts.
[people/teissler/ipfire-2.x.git] / src / initscripts / init.d / networking / red
index 465d528cc84ab634f2a02d9129791d428f22bb90..e62c50d579c887f02c0feb360932da48d55c9e98 100644 (file)
@@ -83,6 +83,8 @@ case "${1}" in
                        echo -n "${DNS1}" > /var/ipfire/red/dns1
                        echo -n "${DNS2}" > /var/ipfire/red/dns2
                        
+                       run_subdir ${rc_base}/init.d/networking/red.up/
+                       
                elif [ "${TYPE}" == "DHCP" ]; then
                        boot_mesg -n "Starting dhcpcd on the ${DEVICE} interface..."            
                        echo -n "${DEVICE}" > /var/ipfire/red/iface
@@ -206,18 +208,6 @@ case "${1}" in
                        /usr/sbin/pppoe-start
                        evaluate_retval
                fi
-               
-               for i in $( ls -v ${rc_base}/init.d/networking/red.up/* 2> /dev/null); do
-                       check_script_status
-                       OUT=$(echo $(basename ${i}) | awk -F- '{ print $2 }')
-                       case "$OUT" in
-                               S) ${i} start   ;;
-                               K) ${i} stop ;;
-                               RS) ${i} restart ;;
-                               RL) ${i} reload ;;
-                               *) ${i} ;;
-                       esac
-               done
                ;;
 
        stop)
@@ -226,6 +216,8 @@ case "${1}" in
                        ip addr del ${args} dev ${DEVICE}
                        evaluate_retval
                        
+                       run_subdir ${rc_base}/init.d/networking/red.down/
+                       
                elif [ "$TYPE" == "DHCP" ]; then
                        boot_mesg -n "Stopping dhcpcd on the ${DEVICE} interface..."
                        if [ -e $LEASEINFO ]; then
@@ -279,17 +271,6 @@ case "${1}" in
                fi
                
                rm -f /var/ipfire/red/{active,device,dial-on-demand,dns1,dns2,local-ipaddress,remote-ipaddress,resolv.conf}
-               for i in $( ls -v ${rc_base}/init.d/networking/red.down/* 2> /dev/null); do
-                       check_script_status
-                       OUT=$(echo $(basename ${i}) | awk -F- '{ print $2 }')
-                       case "$OUT" in
-                               S) ${i} start   ;;
-                               K) ${i} stop ;;
-                               RS) ${i} restart ;;
-                               RL) ${i} reload ;;
-                               *) ${i} ;;
-                       esac
-               done
                ;;
                
 esac