aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2012-05-02 13:41:01 -0400
committerBill Nottingham <notting@redhat.com>2012-06-29 17:07:49 -0400
commitee1fc3d247f49eb907c9349fbab37b61d2c1d532 (patch)
treeef3024d284b39469acc5f14467e8eaa271f76585
parent729826bbcc53c0533c99f52f79d81f59e590a622 (diff)
downloadinitscripts-ee1fc3d247f49eb907c9349fbab37b61d2c1d532.tar
initscripts-ee1fc3d247f49eb907c9349fbab37b61d2c1d532.tar.gz
initscripts-ee1fc3d247f49eb907c9349fbab37b61d2c1d532.tar.bz2
initscripts-ee1fc3d247f49eb907c9349fbab37b61d2c1d532.tar.xz
initscripts-ee1fc3d247f49eb907c9349fbab37b61d2c1d532.zip
check_device_down: Don't bother calling ip to check link state if the device doesn't exist.
-rw-r--r--sysconfig/network-scripts/network-functions1
1 files changed, 1 insertions, 0 deletions
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions
index 6402a7dc..7b71f0f3 100644
--- a/sysconfig/network-scripts/network-functions
+++ b/sysconfig/network-scripts/network-functions
@@ -330,6 +330,7 @@ set_hostname ()
check_device_down ()
{
+ [ ! -d /sys/class/net/$1 ] && return 0
if LC_ALL=C ip -o link show dev $1 2>/dev/null | grep -q ",UP" ; then
return 1
else