aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2004-03-17 00:31:28 +0000
committerBill Nottingham <notting@redhat.com>2004-03-17 00:31:28 +0000
commit373d85d010a4387198caec566c3681b90ff02f6f (patch)
treed0e1679c89826395f84d6cfaa48bbef95222b5d7
parentdd2047c58ee503da2ec812f9b14a7c56e889191c (diff)
downloadinitscripts-373d85d010a4387198caec566c3681b90ff02f6f.tar
initscripts-373d85d010a4387198caec566c3681b90ff02f6f.tar.gz
initscripts-373d85d010a4387198caec566c3681b90ff02f6f.tar.bz2
initscripts-373d85d010a4387198caec566c3681b90ff02f6f.tar.xz
initscripts-373d85d010a4387198caec566c3681b90ff02f6f.zip
make sure hotplug doesn't get stuck unset (#116666, <aoliva@redhat.com>)
-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 }'`