]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
Fixed network initscript that it will work if no bridge is there.
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 31 Dec 2008 16:54:39 +0000 (17:54 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 31 Dec 2008 16:54:39 +0000 (17:54 +0100)
src/initscripts/core/network

index 6f944d4a39cfd1185dfdc1b9f5615d89a3f0e5cb..5a8d62758f546f18deeddc224338f2b0414767b1 100644 (file)
 case "${1}" in
        start)
                # Start all network interfaces
-               for file in ${NETWORK_DEVICES}/*
-               do
+               for file in $(find ${NETWORK_DEVICES} -maxdepth 1); do
                        interface=${file##*/}
 
+                       if [ -d "${file}" ] || [ -n "${interface}" ]; then
+                               continue
+                       fi
+
                        IN_BOOT=1 ${NETWORK_SCRIPTS}/brup ${interface}
                done
                ;;
@@ -33,8 +36,12 @@ case "${1}" in
        stop)
                # Reverse list
                FILES=""
-               for file in ${NETWORK_DEVICES}/*
-               do
+               for file in $(find ${NETWORK_DEVICES} -maxdepth 1); do
+                       interface=${file##*/}
+
+                       if [ -d "${file}" ] || [ -n "${interface}" ]; then
+                               continue
+                       fi
                        FILES="${file} ${FILES}"
                done