]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
network: don't set ip address "1.1.1.1".
authorArne Fitzenreiter <arne_f@ipfire.org>
Sun, 19 Feb 2012 11:48:42 +0000 (12:48 +0100)
committerArne Fitzenreiter <arne_f@ipfire.org>
Sun, 19 Feb 2012 11:48:42 +0000 (12:48 +0100)
This change made also green-only with dhcp possible.
configure green to 1.1.1.1 and red to dhcp client and RED_DEV=green0.

config/rootfiles/core/57/filelists/files
src/initscripts/init.d/networking/any

index a678ee8e7ff9c9a0b58f1bd870e30c9c11b7d1c6..2f80b5f5686512b2d66bb2ce7b78d15a7f1ccb46 100644 (file)
@@ -2,3 +2,4 @@ etc/system-release
 etc/issue
 etc/rc.d/init.d/networking/red.up/10-static-routes
 etc/rc.d/init.d/networking/red.down/10-static-routes
+etc/rc.d/init.d/networking/any
index b88d21ecf783999b11c6095cba30ebf5f24a7d70..5609a9efe93271262fcd68561a2e94280a5c65bd 100644 (file)
@@ -80,15 +80,19 @@ case "${1}" in
                # Create & Enable vnstat data collection
                /usr/bin/vnstat -u -i ${DEVICE} -r --enable --force > /dev/null 2>&1
                
-               boot_mesg "Adding IPv4 address ${ADDRESS} to the ${DEVICE} interface..."
-               ip addr add ${args} dev ${DEVICE}
-               evaluate_retval
+               if [ ! "${ADDRESS}" == "1.1.1.1" ]; then
+                       boot_mesg "Adding IPv4 address ${ADDRESS} to the ${DEVICE} interface..."
+                       ip addr add ${args} dev ${DEVICE}
+                       evaluate_retval
+               fi
                ;;
 
        stop)
-               boot_mesg "Removing IPv4 addresses from the ${DEVICE} interface..."
-               ip addr flush dev ${DEVICE}
-               evaluate_retval
+               if [ ! "${ADDRESS}" == "1.1.1.1" ]; then
+                       boot_mesg "Removing IPv4 addresses from the ${DEVICE} interface..."
+                       ip addr flush dev ${DEVICE}
+                       evaluate_retval
+               fi
 
                # Disable vnstat collection
                /usr/bin/vnstat -u -i ${DEVICE} -r --disable > /dev/null 2>&1