aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/init.d/network
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2001-02-27 19:34:32 +0000
committerBill Nottingham <notting@redhat.com>2001-02-27 19:34:32 +0000
commit40feb42e646b79a4043ac1ad2b89d47408e2f751 (patch)
treedea3503a19bccab09a3df6aa9c3a8766b0ecdd97 /rc.d/init.d/network
parentad5ce41816c487f859c95e4a147b3f7fd93d2ccc (diff)
downloadinitscripts-40feb42e646b79a4043ac1ad2b89d47408e2f751.tar
initscripts-40feb42e646b79a4043ac1ad2b89d47408e2f751.tar.gz
initscripts-40feb42e646b79a4043ac1ad2b89d47408e2f751.tar.bz2
initscripts-40feb42e646b79a4043ac1ad2b89d47408e2f751.tar.xz
initscripts-40feb42e646b79a4043ac1ad2b89d47408e2f751.zip
disable hotplug during network initscript
Diffstat (limited to 'rc.d/init.d/network')
-rwxr-xr-xrc.d/init.d/network5
1 files changed, 5 insertions, 0 deletions
diff --git a/rc.d/init.d/network b/rc.d/init.d/network
index 4e80fbea..c022b7a0 100755
--- a/rc.d/init.d/network
+++ b/rc.d/init.d/network
@@ -66,6 +66,9 @@ case "$1" in
;;
esac
+ oldhotplug=`sysctl kernel.hotplug | awk '{ print $3 }' 2>/dev/null`
+ sysctl -w kernel.hotplug="/bin/true" > /dev/null 2>&1
+
for i in $interfaces; do
if egrep -L "^ONBOOT=\"?[Nn][Oo]\"?" ifcfg-$i >/dev/null 2>&1 ; then
if [ "${i##eth}" != "$i" ]; then
@@ -96,6 +99,8 @@ case "$1" in
fi
done
+ sysctl -w kernel.hotplug=$oldhotplug > /dev/null 2>&1
+
# Add non interface-specific static-routes.
if [ -f /etc/sysconfig/static-routes ]; then
grep "^any" /etc/sysconfig/static-routes | while read ignore type dest netmask mask bogus args; do