aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifdown-eth
diff options
context:
space:
mode:
authorLeon Kos <leon.kos@lecad.fs.uni-lj.si>2015-02-04 16:01:07 +0100
committerLukas Nykryn <lnykryn@redhat.com>2015-02-04 16:01:38 +0100
commit7bece496b8a09df3b15b4aad224bad0b074e2ad7 (patch)
tree171de3935b54aba44f3229a018d3002acab59b10 /sysconfig/network-scripts/ifdown-eth
parent02bc3b8f75684bfb4d12704e3b2c5552807ec34b (diff)
downloadinitscripts-7bece496b8a09df3b15b4aad224bad0b074e2ad7.tar
initscripts-7bece496b8a09df3b15b4aad224bad0b074e2ad7.tar.gz
initscripts-7bece496b8a09df3b15b4aad224bad0b074e2ad7.tar.bz2
initscripts-7bece496b8a09df3b15b4aad224bad0b074e2ad7.tar.xz
initscripts-7bece496b8a09df3b15b4aad224bad0b074e2ad7.zip
ifdown-eth: use scope host for lo
Diffstat (limited to 'sysconfig/network-scripts/ifdown-eth')
-rwxr-xr-xsysconfig/network-scripts/ifdown-eth9
1 files changed, 7 insertions, 2 deletions
diff --git a/sysconfig/network-scripts/ifdown-eth b/sysconfig/network-scripts/ifdown-eth
index cdf44f56..5ce3e1df 100755
--- a/sysconfig/network-scripts/ifdown-eth
+++ b/sysconfig/network-scripts/ifdown-eth
@@ -111,10 +111,15 @@ retcode=0
# brought up. Flush all addresses associated with this
# instance instead.
if [ -d "/sys/class/net/${REALDEVICE}" ]; then
+ if [ "${REALDEVICE}" = "lo" ]; then
+ SCOPE="host"
+ else
+ SCOPE="global"
+ fi
if [ "${REALDEVICE}" = "${DEVICE}" ]; then
- ip addr flush dev ${REALDEVICE} scope global 2>/dev/null
+ ip addr flush dev ${REALDEVICE} scope ${SCOPE} 2>/dev/null
else
- ip addr flush dev ${REALDEVICE} label ${DEVICE} scope global 2>/dev/null
+ ip addr flush dev ${REALDEVICE} label ${DEVICE} scope ${SCOPE} 2>/dev/null
fi
if [ "${SLAVE}" = "yes" -a -n "${MASTER}" ]; then