aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2012-05-02 13:41:01 -0400
committerBill Nottingham <notting@redhat.com>2012-05-02 13:41:01 -0400
commit1d81c888eac95c3abe3ccd0d4bff7e73c57edcef (patch)
tree40dc7dc320f299464314277001a8f213ac8f1287 /sysconfig/network-scripts
parentd1256a2ab6187b2c8696b25697f41a87c736de1b (diff)
downloadinitscripts-1d81c888eac95c3abe3ccd0d4bff7e73c57edcef.tar
initscripts-1d81c888eac95c3abe3ccd0d4bff7e73c57edcef.tar.gz
initscripts-1d81c888eac95c3abe3ccd0d4bff7e73c57edcef.tar.bz2
initscripts-1d81c888eac95c3abe3ccd0d4bff7e73c57edcef.tar.xz
initscripts-1d81c888eac95c3abe3ccd0d4bff7e73c57edcef.zip
check_device_down: Don't bother calling ip to check link state if the device doesn't exist.
Diffstat (limited to 'sysconfig/network-scripts')
-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 89d5da5a..818a985d 100644
--- a/sysconfig/network-scripts/network-functions
+++ b/sysconfig/network-scripts/network-functions
@@ -341,6 +341,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