aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/network-functions
diff options
context:
space:
mode:
Diffstat (limited to 'sysconfig/network-scripts/network-functions')
-rw-r--r--sysconfig/network-scripts/network-functions5
1 files changed, 4 insertions, 1 deletions
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions
index 80542fc7..c797b795 100644
--- a/sysconfig/network-scripts/network-functions
+++ b/sysconfig/network-scripts/network-functions
@@ -180,7 +180,10 @@ is_available ()
fi
HOTPLUG=`cat /proc/sys/kernel/hotplug`
echo "/bin/true" > /proc/sys/kernel/hotplug
- modprobe $1 > /dev/null 2>&1 || return 1
+ modprobe $1 > /dev/null 2>&1 || {
+ echo "$HOTPLUG" > /proc/sys/kernel/hotplug
+ return 1
+ }
echo "$HOTPLUG" > /proc/sys/kernel/hotplug
if [ -n "$HWADDR" ]; then
local curdev=`ip -o link | awk -F ':' -vIGNORECASE=1 '/$HWADDR/ { print $2 }'`