From 4305234be25f3a17ae147d98a2eca93ce4838fdd Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Mon, 6 Nov 2006 21:22:36 +0000 Subject: don't run ethtool if there's no device. Prevents reloading the module on ifdown called by udev on device unregistration. --- sysconfig/network-scripts/network-functions | 1 + 1 file changed, 1 insertion(+) diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions index 3fe8b73f..0342e40b 100644 --- a/sysconfig/network-scripts/network-functions +++ b/sysconfig/network-scripts/network-functions @@ -398,6 +398,7 @@ install_bonding_driver () is_bonding_device () { + [ ! -d "/sys/class/net/$1" ] && return 1 [ "${TYPE}" = "Bonding" ] && return 0 ethtool -i $1 2>/dev/null | grep -q "driver: bonding" && return 0 return 1 -- cgit v1.2.1