aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsysconfig/network-scripts/ifdown-eth5
1 files changed, 4 insertions, 1 deletions
diff --git a/sysconfig/network-scripts/ifdown-eth b/sysconfig/network-scripts/ifdown-eth
index 23038e54..7ccbddf1 100755
--- a/sysconfig/network-scripts/ifdown-eth
+++ b/sysconfig/network-scripts/ifdown-eth
@@ -116,7 +116,10 @@ if [ -d "/sys/class/net/${REALDEVICE}" ]; then
LABEL="label ${DEVICE}"
fi
if [ "${REALDEVICE}" = "lo" ]; then
- ip addr flush dev ${REALDEVICE} ${LABEL} scope host 2>/dev/null
+ TIMEOUT=""
+ [ -x /usr/bin/timeout ] && TIMEOUT="/usr/bin/timeout --signal=SIGQUIT 4"
+ $TIMEOUT ip addr flush dev ${REALDEVICE} ${LABEL} scope global 2>/dev/null
+ $TIMEOUT ip addr flush dev ${REALDEVICE} ${LABEL} scope host 2>/dev/null
else
ip addr flush dev ${REALDEVICE} ${LABEL} scope global 2>/dev/null
ip -4 addr flush dev ${REALDEVICE} ${LABEL} scope host 2>/dev/null