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 89cd8d15..8d8bad67 100755
--- a/sysconfig/network-scripts/ifdown-eth
+++ b/sysconfig/network-scripts/ifdown-eth
@@ -111,7 +111,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