aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifup
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2001-09-04 04:02:07 +0000
committerBill Nottingham <notting@redhat.com>2001-09-04 04:02:07 +0000
commit712c6dc9f51161f12f5fc6469302a6bb9b371e65 (patch)
tree74f27d976140db945b9266361ef89a67118c2f80 /sysconfig/network-scripts/ifup
parent6107f6863630a0e4f41e10fea015637a93a18b22 (diff)
downloadinitscripts-712c6dc9f51161f12f5fc6469302a6bb9b371e65.tar
initscripts-712c6dc9f51161f12f5fc6469302a6bb9b371e65.tar.gz
initscripts-712c6dc9f51161f12f5fc6469302a6bb9b371e65.tar.bz2
initscripts-712c6dc9f51161f12f5fc6469302a6bb9b371e65.tar.xz
initscripts-712c6dc9f51161f12f5fc6469302a6bb9b371e65.zip
fix severe alias handling breakage (#52882)
Diffstat (limited to 'sysconfig/network-scripts/ifup')
-rwxr-xr-xsysconfig/network-scripts/ifup17
1 files changed, 12 insertions, 5 deletions
diff --git a/sysconfig/network-scripts/ifup b/sysconfig/network-scripts/ifup
index 8e106ebc..e4fcf05f 100755
--- a/sysconfig/network-scripts/ifup
+++ b/sysconfig/network-scripts/ifup
@@ -213,17 +213,24 @@ else
SCOPE=
fi
- if ! LC_ALL=C ip addr ls ${DEVICE} | grep -q "${IPADDR}/${PREFIX}" ; then
- if ! ip addr add ${IPADDR}/${PREFIX} \
- brd ${BROADCAST:-+} dev ${DEVICE} ${SCOPE} ; then
+ if ! LC_ALL=C ip addr ls ${REALDEVICE} | grep -q "${IPADDR}/${PREFIX}" ; then
+ if [ "$ISALIAS" = "yes" ]; then
+ if ! ip addr add ${IPADDR}/${PREFIX} \
+ brd ${BROADCAST:-+} dev ${REALDEVICE} ${SCOPE} label ${DEVICE}; then
echo $"Error adding address ${IPADDR} for ${DEVICE}."
+ fi
+ else
+ if ! ip addr add ${IPADDR}/${PREFIX} \
+ brd ${BROADCAST:-+} dev ${REALDEVICE} ${SCOPE} ; then
+ echo $"Error adding address ${IPADDR} for ${DEVICE}."
+ fi
fi
fi
# update ARP cache of neighboring computers
- arping -q -A -c 1 -I ${DEVICE} ${IPADDR}
+ arping -q -A -c 1 -I ${REALDEVICE} ${IPADDR}
( sleep 2;
- arping -q -U -c 1 -I ${DEVICE} ${IPADDR} ) > /dev/null 2>&1 < /dev/null &
+ arping -q -U -c 1 -I ${REALDEVICE} ${IPADDR} ) > /dev/null 2>&1 < /dev/null &
# Add a route for the subnet. Replace any existing route.
if [ "${ISALIAS}" = no ]; then