aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/network-functions
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2006-02-28 20:21:39 +0000
committerBill Nottingham <notting@redhat.com>2006-02-28 20:21:39 +0000
commit90004e3f54a4f58aa7a415781b0a0824fb9d7eb2 (patch)
tree456af7f6e6b73165404dc66902134c69a08b97d9 /sysconfig/network-scripts/network-functions
parent8b5fcc00b7d4d0ab44618a4db8a6d146cd65c747 (diff)
downloadinitscripts-90004e3f54a4f58aa7a415781b0a0824fb9d7eb2.tar
initscripts-90004e3f54a4f58aa7a415781b0a0824fb9d7eb2.tar.gz
initscripts-90004e3f54a4f58aa7a415781b0a0824fb9d7eb2.tar.bz2
initscripts-90004e3f54a4f58aa7a415781b0a0824fb9d7eb2.tar.xz
initscripts-90004e3f54a4f58aa7a415781b0a0824fb9d7eb2.zip
don't cause the module to get reloaded on ifdown if it's not loaded
(#179809)
Diffstat (limited to 'sysconfig/network-scripts/network-functions')
-rw-r--r--sysconfig/network-scripts/network-functions4
1 files changed, 2 insertions, 2 deletions
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions
index 92800149..1ed37e01 100644
--- a/sysconfig/network-scripts/network-functions
+++ b/sysconfig/network-scripts/network-functions
@@ -12,7 +12,7 @@ get_hwaddr ()
{
if [ -f /sys/class/net/${1}/address ]; then
cat /sys/class/net/${1}/address
- else
+ elif [ -d "/sys/class/net/${1}" ]; then
LC_ALL= LANG= ip -o link show ${1} 2>/dev/null | \
sed 's/.*link\/[^ ]* \([[:alnum:]:]*\).*/\1/'
fi
@@ -241,7 +241,7 @@ check_device_down ()
return 0
fi
else
- if LC_ALL=C ip -o link ls dev $1 2>/dev/null | grep -q ",UP" ; then
+ if LC_ALL=C ip -o link 2>/dev/null | grep -q "$1:.*,UP" ; then
return 1
else
return 0