aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiloslav Trmac <mitr@volny.cz>2006-04-18 20:17:06 +0000
committerMiloslav Trmac <mitr@volny.cz>2006-04-18 20:17:06 +0000
commit4303e664ad654214837b2e6115796e44b89511ae (patch)
tree9be3c8020b0f41e80794c61e6029394c0f5654da
parent30d62ff8c984b0eb975f34096ce17c40f8f1f9fc (diff)
downloadinitscripts-4303e664ad654214837b2e6115796e44b89511ae.tar
initscripts-4303e664ad654214837b2e6115796e44b89511ae.tar.gz
initscripts-4303e664ad654214837b2e6115796e44b89511ae.tar.bz2
initscripts-4303e664ad654214837b2e6115796e44b89511ae.tar.xz
initscripts-4303e664ad654214837b2e6115796e44b89511ae.zip
Add NETWORKDELAY and LINKDELAY (#176851)
-rwxr-xr-xrc.d/init.d/network2
-rw-r--r--sysconfig.txt13
-rwxr-xr-xsysconfig/network-scripts/ifup-eth4
3 files changed, 18 insertions, 1 deletions
diff --git a/rc.d/init.d/network b/rc.d/init.d/network
index 2a287dd6..8e0255b5 100755
--- a/rc.d/init.d/network
+++ b/rc.d/init.d/network
@@ -166,6 +166,8 @@ case "$1" in
sysctl -e -p /etc/sysctl.conf >/dev/null 2>&1
touch /var/lock/subsys/network
+
+ [ -n "${NETWORKDELAY}" ] && /bin/sleep ${NETWORKDELAY}
;;
stop)
# If this is a final shutdown/halt, check for network FS,
diff --git a/sysconfig.txt b/sysconfig.txt
index 211d2344..08a51e5c 100644
--- a/sysconfig.txt
+++ b/sysconfig.txt
@@ -183,6 +183,11 @@ Files in /etc/sysconfig
All the IPX stuff is optional, and should default to off.
+ NETWORKDELAY=<delay in seconds>
+ Delay in seconds after all network interfaces are initialized. Useful if
+ network has spanning tree running and must wait for STP convergence.
+ Default: 0 (no delay)
+
NETWORKING_IPV6=yes|no
Enable or disable global IPv6 initialization
Default: no
@@ -655,7 +660,13 @@ Files in /etc/sysconfig/network-scripts/
ETHTOOL_OPTS="speed 100 duplex full autoneg off"
Note that changing speed or duplex settings almost always
requires disabling autonegotiation with 'autoneg off'.
-
+ LINKDELAY=<time in seconds>
+ Time that the system should pause after the specific interface is
+ enabled. This may be useful if one interface is connected to a
+ switch which has spanning tree enabled and must wait for STP to
+ converge before the interface should be considered usable.
+ Supported only with BOOTPROTO=none.
+
No longer supported:
PROMISC=yes|no (enable or disable promiscuous mode)
ALLMULTI=yes|no (enable or disable all-multicast mode)
diff --git a/sysconfig/network-scripts/ifup-eth b/sysconfig/network-scripts/ifup-eth
index dad0d851..081c3fd1 100755
--- a/sysconfig/network-scripts/ifup-eth
+++ b/sysconfig/network-scripts/ifup-eth
@@ -88,6 +88,7 @@ if [ -n "${BRIDGE}" -a -x /usr/sbin/brctl ]; then
fi
/sbin/ip addr flush dev ${DEVICE} 2>/dev/null
/sbin/ip link set dev ${DEVICE} up
+ [ -n "${LINKDELAY}" ] && /bin/sleep ${LINKDELAY}
/usr/sbin/brctl addif ${BRIDGE} ${DEVICE}
# Upon adding a device to a bridge,
# it's necessary to make radvd reload its config
@@ -116,6 +117,7 @@ fi
if [ "${TYPE}" = "Bonding" ] || ethtool -i $DEVICE 2>/dev/null| grep -q "driver: bonding" ; then
/sbin/ip link set dev ${DEVICE} down
/sbin/ip link set dev ${DEVICE} up
+ [ -n "${LINKDELAY}" ] && /bin/sleep ${LINKDELAY}
for device in `LANG=C grep -l "^[[:space:]]*MASTER=${DEVICE}" /etc/sysconfig/network-scripts/ifcfg-*` ; do
if [ "$BOOTPROTO" = "dhcp" ]; then
/sbin/ifup ${device##*/}
@@ -190,6 +192,7 @@ else
if [ -n "$ETHTOOL_OPTS" ] ; then
/sbin/ethtool -s ${REALDEVICE} $ETHTOOL_OPTS
fi
+ [ -n "${LINKDELAY}" ] && /bin/sleep ${LINKDELAY}
# Bonding initialization part II
if [ "${TYPE}" = "Bonding" ] || ethtool -i $DEVICE 2>/dev/null| grep -q "driver: bonding" ; then
for device in `LANG=C grep -l "^[[:space:]]*MASTER=${DEVICE}" /etc/sysconfig/network-scripts/ifcfg-*` ; do
@@ -217,6 +220,7 @@ else
/sbin/ethtool -s ${REALDEVICE} $ETHTOOL_OPTS
fi
+ [ -n "${LINKDELAY}" ] && /bin/sleep ${LINKDELAY}
if [ "${DEVICE}" = "lo" ]; then
SCOPE="scope host"