aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig
diff options
context:
space:
mode:
authorLukas Nykryn <lnykryn@redhat.com>2015-10-15 09:59:10 +0200
committerLukas Nykryn <lnykryn@redhat.com>2015-10-15 10:13:55 +0200
commitbe40a46a55b6e53a02c4824da68fd7d2f96c2fc6 (patch)
tree42ab0b94bf0d62c3b13ec060e49254ea7d95098d /sysconfig
parent0ed79af945f2a12178c4b9280d11d5a571796c75 (diff)
downloadinitscripts-be40a46a55b6e53a02c4824da68fd7d2f96c2fc6.tar
initscripts-be40a46a55b6e53a02c4824da68fd7d2f96c2fc6.tar.gz
initscripts-be40a46a55b6e53a02c4824da68fd7d2f96c2fc6.tar.bz2
initscripts-be40a46a55b6e53a02c4824da68fd7d2f96c2fc6.tar.xz
initscripts-be40a46a55b6e53a02c4824da68fd7d2f96c2fc6.zip
ifdown: clean ipv4 localhost addresses
Diffstat (limited to 'sysconfig')
-rwxr-xr-xsysconfig/network-scripts/ifdown-eth14
1 files changed, 7 insertions, 7 deletions
diff --git a/sysconfig/network-scripts/ifdown-eth b/sysconfig/network-scripts/ifdown-eth
index 5ce3e1df..fb2d291c 100755
--- a/sysconfig/network-scripts/ifdown-eth
+++ b/sysconfig/network-scripts/ifdown-eth
@@ -111,15 +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
+ LABEL=
if [ "${REALDEVICE}" = "${DEVICE}" ]; then
- ip addr flush dev ${REALDEVICE} scope ${SCOPE} 2>/dev/null
+ LABEL="label ${DEVICE}"
+ fi
+ if [ "${REALDEVICE}" = "lo" ]; then
+ ip addr flush dev ${REALDEVICE} ${LABEL} scope host 2>/dev/null
else
- ip addr flush dev ${REALDEVICE} label ${DEVICE} scope ${SCOPE} 2>/dev/null
+ ip addr flush dev ${REALDEVICE} ${LABEL} scope global 2>/dev/null
+ ip -4 addr flush dev ${REALDEVICE} ${LABEL} scope host 2>/dev/null
fi
if [ "${SLAVE}" = "yes" -a -n "${MASTER}" ]; then