]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - src/initscripts/networking/red
Merge branch 'core110'
[people/pmueller/ipfire-2.x.git] / src / initscripts / networking / red
index 9dfbad65ed8c62de510f71c0c6ca5d43e6e76046..20567ce512d7a40ec0c27f3f8f9e05ff26faf481 100644 (file)
@@ -124,6 +124,9 @@ case "${1}" in
                        echo -n "${DNS2}" > /var/ipfire/red/dns2
                        touch /var/ipfire/red/active
                        
+                       # Create route to default gateway
+                       ip route add ${GATEWAY} dev ${DEVICE}
+
                        boot_mesg "Setting up default gateway ${GATEWAY}..."
                        ip route add default via ${GATEWAY} dev ${DEVICE}
                        evaluate_retval
@@ -454,6 +457,8 @@ case "${1}" in
                ;;
 
        stop)
+               rm -f /var/ipfire/red/{active,device,dial-on-demand,dns1,dns2,local-ipaddress,remote-ipaddress,resolv.conf}
+
                if [ "$TYPE" == "STATIC" ]; then
                        boot_mesg "Stopping default gateway ${GATEWAY}..."
                        ip route del default via ${GATEWAY} >/dev/null 2>&1
@@ -518,7 +523,6 @@ case "${1}" in
                ## Disable vnstat collection
                /usr/bin/vnstat -u -i ${DEVICE} -r --disable > /dev/null 2>&1
 
-               rm -f /var/ipfire/red/{active,device,dial-on-demand,dns1,dns2,local-ipaddress,remote-ipaddress,resolv.conf}
                exit 0;
                ;;
 esac