aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2001-01-29 23:21:21 +0000
committerBill Nottingham <notting@redhat.com>2001-01-29 23:21:21 +0000
commitbf5b844b6ef35805b0c73fedbf04716024abad17 (patch)
tree094aebc081ebe06fcba360028e6c0bf2f06dc951 /sysconfig/network-scripts
parentb2c6bcce3be25a9afa2e5390015e383eb46d90b3 (diff)
downloadinitscripts-bf5b844b6ef35805b0c73fedbf04716024abad17.tar
initscripts-bf5b844b6ef35805b0c73fedbf04716024abad17.tar.gz
initscripts-bf5b844b6ef35805b0c73fedbf04716024abad17.tar.bz2
initscripts-bf5b844b6ef35805b0c73fedbf04716024abad17.tar.xz
initscripts-bf5b844b6ef35805b0c73fedbf04716024abad17.zip
handle aliases better in check_device_down (#18687)
Diffstat (limited to 'sysconfig/network-scripts')
-rw-r--r--sysconfig/network-scripts/network-functions12
1 files changed, 10 insertions, 2 deletions
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions
index 648cb95d..1a43ffaf 100644
--- a/sysconfig/network-scripts/network-functions
+++ b/sysconfig/network-scripts/network-functions
@@ -64,10 +64,18 @@ set_hostname()
check_device_down ()
{
- if LANG=C ifconfig ${DEVICE} 2>/dev/null | 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
}