aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2003-09-03 23:46:29 +0000
committerBill Nottingham <notting@redhat.com>2003-09-03 23:46:29 +0000
commit025fef872234164ff3d07456e0e627c98be352f2 (patch)
tree6e86a5b07548cd643ae14da9f73b5afd15b5833c
parenteef578ceb9d0339c661f1cbeb8ae8c99f7c4ddc0 (diff)
downloadinitscripts-025fef872234164ff3d07456e0e627c98be352f2.tar
initscripts-025fef872234164ff3d07456e0e627c98be352f2.tar.gz
initscripts-025fef872234164ff3d07456e0e627c98be352f2.tar.bz2
initscripts-025fef872234164ff3d07456e0e627c98be352f2.tar.xz
initscripts-025fef872234164ff3d07456e0e627c98be352f2.zip
disable hotplug when loading modules (#98611)
-rw-r--r--sysconfig/network-scripts/network-functions3
1 files changed, 3 insertions, 0 deletions
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions
index ad106fb3..a6bbf1de 100644
--- a/sysconfig/network-scripts/network-functions
+++ b/sysconfig/network-scripts/network-functions
@@ -178,7 +178,10 @@ is_available ()
if [ -z "$alias" -o "$alias" = "off" ]; then
return 2
fi
+ HOTPLUG=`cat /proc/sys/kernel/hotplug`
+ echo "/bin/true" > /proc/sys/kernel/hotplug
modprobe $1 > /dev/null 2>&1 || return 1
+ echo "$HOTPLUG" > /proc/sys/kernel/hotplug
if [ -n "$HWADDR" ]; then
local curdev=`ip -o link | awk -F ':' -vIGNORECASE=1 '/$HWADDR/ { print $2 }'`
rename_device "$1" "$HWADDR" "$curdev"