aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Nykryn <lnykryn@redhat.com>2016-06-30 07:42:41 +0200
committerLukas Nykryn <lnykryn@redhat.com>2016-06-30 07:42:41 +0200
commitd59202d1d37c23126e17f8bc05d8a05d059b72a0 (patch)
tree384590fdc543b5833efcf90ef8dd79728b94d925
parent847dc971b25f0d70fc679f342d8d926a887719db (diff)
downloadinitscripts-d59202d1d37c23126e17f8bc05d8a05d059b72a0.tar
initscripts-d59202d1d37c23126e17f8bc05d8a05d059b72a0.tar.gz
initscripts-d59202d1d37c23126e17f8bc05d8a05d059b72a0.tar.bz2
initscripts-d59202d1d37c23126e17f8bc05d8a05d059b72a0.tar.xz
initscripts-d59202d1d37c23126e17f8bc05d8a05d059b72a0.zip
ifdown-eth: we need to flush global scope as well but it is stuck some time
-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