From 1d81c888eac95c3abe3ccd0d4bff7e73c57edcef Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 2 May 2012 13:41:01 -0400 Subject: check_device_down: Don't bother calling ip to check link state if the device doesn't exist. --- sysconfig/network-scripts/network-functions | 1 + 1 file changed, 1 insertion(+) (limited to 'sysconfig/network-scripts/network-functions') 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 -- cgit v1.2.1