diff options
author | Bill Nottingham <notting@redhat.com> | 2001-04-02 21:06:37 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2001-04-02 21:06:37 +0000 |
commit | c48bf41abf55b5491b00b94fd2115dd6490d1aab (patch) | |
tree | ac91082cbf306a2f697f07604d821c6c7f3b5302 /sysconfig | |
parent | 81bb56a238b09edfe21c757e2cbe77a5fa32a273 (diff) | |
download | initscripts-c48bf41abf55b5491b00b94fd2115dd6490d1aab.tar initscripts-c48bf41abf55b5491b00b94fd2115dd6490d1aab.tar.gz initscripts-c48bf41abf55b5491b00b94fd2115dd6490d1aab.tar.bz2 initscripts-c48bf41abf55b5491b00b94fd2115dd6490d1aab.tar.xz initscripts-c48bf41abf55b5491b00b94fd2115dd6490d1aab.zip |
handle aliases better in check_device_down (#18687)
fix ARP handling, allow for setting promiscuous or all-multicast mode
oops, put the LANG=C in the right place
fix the adding default route if GATEWAY" = "0.0.0.0
Diffstat (limited to 'sysconfig')
-rw-r--r-- | sysconfig/network-scripts/network-functions | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions index 8b726a83..1a43ffaf 100644 --- a/sysconfig/network-scripts/network-functions +++ b/sysconfig/network-scripts/network-functions @@ -17,6 +17,20 @@ source_config () . $CONFIG } +toggle_value() +{ + if [ -z "$2" ] + then + echo '' + elif [ "$2" = "yes" -o "$2" = "YES" ] ; then + echo "$1" + elif [ "$2" = "no" -o "$2" = "NO" ] ; then + echo "-$1" + else + echo '' + fi +} + do_netreport () { # Notify programs that have requested notification @@ -50,10 +64,18 @@ set_hostname() check_device_down () { - if ifconfig ${DEVICE} 2>/dev/null | LANG=C grep " UP " >/dev/null 2>&1 ; then + if echo ${DEVICE} | grep -q ':' ; then + if LANG=C ifconfig -a 2>/dev/null | grep -q ${DEVICE} ; then + retcode=1 + else + retcode=0 + fi + else + if LANG=C ifconfig ${DEVICE} 2>/dev/null | grep " UP " >/dev/null 2>&1 ; then retcode=1 - else + else retcode=0 + fi fi return $retcode } |