diff options
author | Miloslav Trmac <mitr@volny.cz> | 2006-04-18 20:11:45 +0000 |
---|---|---|
committer | Miloslav Trmac <mitr@volny.cz> | 2006-04-18 20:11:45 +0000 |
commit | 747e9db1604cc27ec2ab15e829656172f1986ab4 (patch) | |
tree | 6e4b75432bdcb04b80fef1ac7b027d2d4dbc893e /sysconfig | |
parent | af200403194358a1093a6ab495ec92aaefdb8fee (diff) | |
download | initscripts-747e9db1604cc27ec2ab15e829656172f1986ab4.tar initscripts-747e9db1604cc27ec2ab15e829656172f1986ab4.tar.gz initscripts-747e9db1604cc27ec2ab15e829656172f1986ab4.tar.bz2 initscripts-747e9db1604cc27ec2ab15e829656172f1986ab4.tar.xz initscripts-747e9db1604cc27ec2ab15e829656172f1986ab4.zip |
Add NETWORKDELAY and LINKDELAY (#176851)
Diffstat (limited to 'sysconfig')
-rwxr-xr-x | sysconfig/network-scripts/ifup | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sysconfig/network-scripts/ifup b/sysconfig/network-scripts/ifup index a4c3934d..43fbf1c5 100755 --- a/sysconfig/network-scripts/ifup +++ b/sysconfig/network-scripts/ifup @@ -189,8 +189,9 @@ fi if [ -n "${BRIDGE}" -a -x /usr/sbin/brctl ]; then /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, + # Upon adding a device to a bridge, # it's necessary to make radvd reload its config [ -r /var/run/radvd/radvd.pid ] && kill -HUP `cat /var/run/radvd/radvd.pid` exit 0 @@ -230,6 +231,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##*/} @@ -351,6 +353,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 @@ -378,6 +381,8 @@ else /sbin/ethtool -s ${REALDEVICE} $ETHTOOL_OPTS fi + [ -n "${LINKDELAY}" ] && /bin/sleep ${LINKDELAY} + if ! arping -q -c 2 -w 3 -D -I ${REALDEVICE} ${IPADDR} ; then echo $"Error, some other host already uses address ${IPADDR}." exit 1 |