]> TLD Linux GIT Repositories - rc-scripts.git/blobdiff - rc.d/init.d/network
- merged changes from PLD, all TLD changes and fixes are kept
[rc-scripts.git] / rc.d / init.d / network
index 3592a2b476f104eb83fb047236aa5df875882c21..5e8cd207361485961756b0daca3af1b1dbdf0216 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
        )
 }