aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2006-11-20 22:03:59 +0000
committerBill Nottingham <notting@redhat.com>2006-11-20 22:03:59 +0000
commitb17ded48cd5f1d5e23b378d94a75ca6626509d43 (patch)
treed727a3f32b6e540f13e9f4de7922340268654e9b /sysconfig
parentcbf2da88966bcf337be2ee5eada7552da8a4d78d (diff)
downloadinitscripts-b17ded48cd5f1d5e23b378d94a75ca6626509d43.tar
initscripts-b17ded48cd5f1d5e23b378d94a75ca6626509d43.tar.gz
initscripts-b17ded48cd5f1d5e23b378d94a75ca6626509d43.tar.bz2
initscripts-b17ded48cd5f1d5e23b378d94a75ca6626509d43.tar.xz
initscripts-b17ded48cd5f1d5e23b378d94a75ca6626509d43.zip
- ifdown, ifup-aliases: fix static routes for aliases (#202948)
Diffstat (limited to 'sysconfig')
-rwxr-xr-xsysconfig/network-scripts/ifdown8
-rwxr-xr-xsysconfig/network-scripts/ifup-routes2
2 files changed, 5 insertions, 5 deletions
diff --git a/sysconfig/network-scripts/ifdown b/sysconfig/network-scripts/ifdown
index 5a440044..a22e7302 100755
--- a/sysconfig/network-scripts/ifdown
+++ b/sysconfig/network-scripts/ifdown
@@ -105,7 +105,7 @@ retcode=0
pump -r -i ${DEVICE}
retcode=$?
}
-if ! [ "$BOOTPROTO" = bootp -o "$BOOTPROTO" = dhcp ]; then
+if [ -d "/sys/class/net/${REALDEVICE}" ]; then
# we can't just delete the configured address because that address
# may have been changed in the config file since the device was
# brought up. Flush all addresses associated with this
@@ -119,10 +119,10 @@ if ! [ "$BOOTPROTO" = bootp -o "$BOOTPROTO" = dhcp ]; then
if [ "${SLAVE}" = "yes" -a -n "${MASTER}" ]; then
/sbin/ifenslave -d ${MASTER} ${DEVICE} 2>/dev/null
fi
-fi
-if [ "${REALDEVICE}" = "${DEVICE}" ]; then
- ip link set dev ${DEVICE} down 2>/dev/null
+ if [ "${REALDEVICE}" = "${DEVICE}" ]; then
+ ip link set dev ${DEVICE} down 2>/dev/null
+ fi
fi
[ "$retcode" = "0" ] && retcode=$?
diff --git a/sysconfig/network-scripts/ifup-routes b/sysconfig/network-scripts/ifup-routes
index bf56091d..f9889f88 100755
--- a/sysconfig/network-scripts/ifup-routes
+++ b/sysconfig/network-scripts/ifup-routes
@@ -30,7 +30,7 @@ for file in $FILES; do
if [ -f "$file" ]; then
if egrep -q '^[[:space:]]*ADDRESS[0-9]+=' $file ; then
# new format
- handle_file $file $1
+ handle_file $file ${1%:*}
else
# older format
while read line; do