aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig
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:02:09 +0100
commitebf9c167ecffc67617d6c89564e8394ccf985fbc (patch)
tree654bdfff054dc0ae598643d3ac4b45625dd85409 /sysconfig
parent520a2c79081e14e7de04dc756629f83535d31f0c (diff)
downloadinitscripts-ebf9c167ecffc67617d6c89564e8394ccf985fbc.tar
initscripts-ebf9c167ecffc67617d6c89564e8394ccf985fbc.tar.gz
initscripts-ebf9c167ecffc67617d6c89564e8394ccf985fbc.tar.bz2
initscripts-ebf9c167ecffc67617d6c89564e8394ccf985fbc.tar.xz
initscripts-ebf9c167ecffc67617d6c89564e8394ccf985fbc.zip
ifdown-eth: use scope host for lo
Diffstat (limited to 'sysconfig')
-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 45a82646..f56e4c57 100755
--- a/sysconfig/network-scripts/ifdown-eth
+++ b/sysconfig/network-scripts/ifdown-eth
@@ -106,10 +106,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