aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifdown-eth
diff options
context:
space:
mode:
authorLukas Nykryn <lnykryn@redhat.com>2016-06-30 07:42:41 +0200
committerDee'Kej <deekej@linuxmail.org>2017-03-28 12:26:54 +0200
commit5b048aea7192678e37bf2806a4b025f51f67165e (patch)
treebb971b3c647bfefd89c758955cac8e2136154853 /sysconfig/network-scripts/ifdown-eth
parent9a5185bf94c7012acf6c63488449760de3abab4b (diff)
downloadinitscripts-5b048aea7192678e37bf2806a4b025f51f67165e.tar
initscripts-5b048aea7192678e37bf2806a4b025f51f67165e.tar.gz
initscripts-5b048aea7192678e37bf2806a4b025f51f67165e.tar.bz2
initscripts-5b048aea7192678e37bf2806a4b025f51f67165e.tar.xz
initscripts-5b048aea7192678e37bf2806a4b025f51f67165e.zip
ifdown-eth: we need to flush global scope as well
... but it is stuck some time
Diffstat (limited to 'sysconfig/network-scripts/ifdown-eth')
-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