]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
Added some indication in what stage we are running.
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 4 Feb 2009 20:45:14 +0000 (21:45 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 4 Feb 2009 20:45:14 +0000 (21:45 +0100)
src/initscripts/core/network
src/initscripts/core/rc
src/initscripts/networking/net-hotplug

index 5a8d62758f546f18deeddc224338f2b0414767b1..2cc3a06979a01f1d289681f06136b8218ebdab9d 100644 (file)
@@ -31,6 +31,7 @@ case "${1}" in
 
                        IN_BOOT=1 ${NETWORK_SCRIPTS}/brup ${interface}
                done
+               touch /var/lock/subsys/network
                ;;
 
        stop)
@@ -52,6 +53,7 @@ case "${1}" in
 
                        IN_BOOT=1 ${NETWORK_SCRIPTS}/brdown ${interface}
                done
+               rm -f /var/lock/subsys/network
                ;;
 
        restart)
index 5faf1a00f6c5c8dc2ad3f227cd142e7497b72c53..53dc48020da1b026b8e0f8cda4915d3cb6e1f0a5 100644 (file)
@@ -25,6 +25,10 @@ if [ "${prevlevel}" = "" ]; then
     prevlevel="N"
 fi
 
+if [ "${runlevel}" = "S" ]; then
+       touch /dev/.in_sysinit
+fi
+
 # Mount a tmpfs to store boot accounting information
 if [ "${runlevel}" = "S" -a "${TEMPFS_MOUNT}" != "" ]; then
     mount -n -t tmpfs tmpfs "${TEMPFS_MOUNT}" -o mode=600
@@ -178,6 +182,8 @@ do
     fi
 done
 
+rm -f /dev/.in_sysinit
+
 # Strip apply time to the logs, strip out any color codes and dump 
 # the log to /var/log/boot.log
 if [ -f "${TEMPFS_MOUNT}/.bootlog" -a "${runlevel}" != "S" ]; then
index 23c02dc3cbaeccf4d3f0dd9cc42dfbd4fbbe1b38..a2d4cd3a41209d7cf60bb7a470c705ddef814c20 100644 (file)
@@ -29,6 +29,13 @@ MAC=$(get_mac_by_device ${INTERFACE})
 
 case $ACTION in
        add|register)
+               # Don't do anything if the network is stopped
+               if [ -f /dev/.in_sysinit ] ; then
+                       exit 0
+               fi
+               if [ ! -f /var/lock/subsys/network ]; then
+                       exit 0
+               fi
                case $INTERFACE in
                        # interfaces that are brought up as a part of configuration
                        ppp*|ippp*|isdn*|plip*|lo*|irda*|dummy*|ipsec*|tun*|tap*)