]> TLD Linux GIT Repositories - rc-scripts.git/blobdiff - rc.d/init.d/network
- version 0.5.4
[rc-scripts.git] / rc.d / init.d / network
index 3592a2b476f104eb83fb047236aa5df875882c21..cf670a74a19899f20252996e10267a07236307d9 100755 (executable)
@@ -130,7 +130,7 @@ network_interface_configs() {
 
 find_boot_interfaces() {
        ifcfg_files="$(network_interface_configs 'ifcfg-*')"
-       bootprio=$(grep '^BOOTPRIO=' $ifcfg_files)
+       bootprio=$(grep '^BOOTPRIO=' $ifcfg_files 2>/dev/null)
 
        if [ -n "$bootprio" ]; then
                # find all the interfaces besides loopback.
@@ -143,7 +143,7 @@ find_boot_interfaces() {
                                DEVICE=""; ONBOOT=""; USERS=""; . "$i" 2>/dev/null
                                [ "${DEVICE:+set}" != "set" ] && continue
                                [ ${USERS:-no} != no ] && continue
-                               [ ${ONBOOT:-no} = yes ] && echo "${i##*/ifcfg-}"
+                               is_yes ${ONBOOT:-no} && echo "${i##*/ifcfg-}"
                        done
                `
        else
@@ -155,7 +155,7 @@ find_boot_interfaces() {
                                DEVICE=""; ONBOOT=""; USERS=""; . "$i" 2>/dev/null
                                [ "${DEVICE:+set}" != "set" ] && continue
                                [ ${USERS:-no} != no ] && continue
-                               [ ${ONBOOT:-no} = yes ] && echo "${i##*/ifcfg-}"
+                               is_yes ${ONBOOT:-no} && echo "${i##*/ifcfg-}"
                        done
                `
 
@@ -168,7 +168,7 @@ find_boot_interfaces() {
                                DEVICE=""; ONBOOT=""; USERS=""; . "$i" 2>/dev/null
                                [ "${DEVICE:+set}" != "set" ] && continue
                                [ ${USERS:-no} != no ] && continue
-                               [ ${ONBOOT:-no} = yes ] && echo "${i##*/ifcfg-}"
+                               is_yes ${ONBOOT:-no} && echo "${i##*/ifcfg-}"
                        done
                `
 
@@ -181,7 +181,7 @@ find_boot_interfaces() {
                                DEVICE=""; ONBOOT=""; USERS=""; . "$i" 2>/dev/null
                                [ "${DEVICE:+set}" != "set" ] && continue
                                [ ${USERS:-no} != no ] && continue
-                               [ ${ONBOOT:-no} = yes ] && echo "${i##*/ifcfg-}"
+                               is_yes ${ONBOOT:-no} && echo "${i##*/ifcfg-}"
                        done
                `
 
@@ -194,7 +194,7 @@ find_boot_interfaces() {
                                DEVICE=""; ONBOOT=""; USERS=""; . "$i" 2>/dev/null
                                [ "${DEVICE:+set}" != "set" ] && continue
                                [ ${USERS:-no} != no ] && continue
-                               [ ${ONBOOT:-no} = yes ] && echo "${i##*/ifcfg-}"
+                               is_yes ${ONBOOT:-no} && echo "${i##*/ifcfg-}"
                        done
                `
 
@@ -207,7 +207,7 @@ find_boot_interfaces() {
                                DEVICE=""; ONBOOT=""; USERS=""; . "$i" 2>/dev/null
                                [ "${DEVICE:+set}" != "set" ] && continue
                                [ ${USERS:-no} != no ] && continue
-                               [ ${ONBOOT:-no} = yes ] && echo "${i##*/ifcfg-}"
+                               is_yes ${ONBOOT:-no} && echo "${i##*/ifcfg-}"
                        done
                `
        fi
@@ -217,7 +217,7 @@ find_boot_interfaces() {
                        DEVICE=""; ONBOOT=""; USERS=""; . "$i" 2>/dev/null
                        [ "${DEVICE:+set}" != "set" ] && continue
                        [ ${USERS:-no} != no ] && continue
-                       [ ${ONBOOT:-no} = yes ] && echo "${i##*/tnlcfg-}"
+                       is_yes ${ONBOOT:-no} && echo "${i##*/tnlcfg-}"
                done
        )
 }
@@ -356,11 +356,7 @@ find_boot_interfaces
 # See how we were called.
 case "$1" in
   start)
-       if is_yes "$VSERVER_ISOLATION_NET"; then
-               touch /var/lock/subsys/network
-       else
-               start
-       fi
+       start
        ;;
   start_init)
        network_init
@@ -374,11 +370,7 @@ case "$1" in
        rm -f /var/lock/subsys/network
        ;;
   stop)
-       if is_yes "$VSERVER_ISOLATION_NET"; then
-               rm -f /var/lock/subsys/network >/dev/null 2>&1
-       else
-               stop
-       fi
+       stop
        ;;
 
   status)
@@ -394,18 +386,11 @@ case "$1" in
        ;;
 
   reload)
-       if is_yes "$VSERVER_ISOLATION_NET"; then
-               exit 0
-       fi
        shift
        reload ${1:+"$@"}
        ;;
 
   restart)
-       if is_yes "$VSERVER_ISOLATION_NET"; then
-               exit 0
-       fi
-
        stop
        start
        ;;