aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2012-05-02 13:41:01 -0400
committerBill Nottingham <notting@redhat.com>2012-07-06 09:16:32 -0400
commit1431d78191f67c900eed26a9368c0a3c4bcfa257 (patch)
treebc23cb51867263251d8d9d669b8e11adee0c4d52 /sysconfig
parentb3ab51fe02a90185cb1d481c2d616795a6e5033f (diff)
downloadinitscripts-1431d78191f67c900eed26a9368c0a3c4bcfa257.tar
initscripts-1431d78191f67c900eed26a9368c0a3c4bcfa257.tar.gz
initscripts-1431d78191f67c900eed26a9368c0a3c4bcfa257.tar.bz2
initscripts-1431d78191f67c900eed26a9368c0a3c4bcfa257.tar.xz
initscripts-1431d78191f67c900eed26a9368c0a3c4bcfa257.zip
check_device_down: Don't bother calling ip to check link state if the device doesn't exist.
Diffstat (limited to 'sysconfig')
-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 f6d2f05b..7d4edd9f 100644
--- a/sysconfig/network-scripts/network-functions
+++ b/sysconfig/network-scripts/network-functions
@@ -321,6 +321,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