aboutsummaryrefslogtreecommitdiffstats
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
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)
-rw-r--r--initscripts.spec1
-rwxr-xr-xsysconfig/network-scripts/ifdown8
-rwxr-xr-xsysconfig/network-scripts/ifup-routes2
3 files changed, 6 insertions, 5 deletions
diff --git a/initscripts.spec b/initscripts.spec
index 2c4f589a..edfbb21b 100644
--- a/initscripts.spec
+++ b/initscripts.spec
@@ -216,6 +216,7 @@ rm -rf $RPM_BUILD_ROOT
- rc.sysinit: don't use vgscan, only use vgchange (#191879)
- ifdown: run ifenslave -d on bonding devices (#199706)
- init.d/halt: don't try to unmount network mounts (#200915)
+- ifdown, ifup-aliases: fix static routes for aliases (#202948)
* Fri Apr 21 2006 Miloslav Trmac <mitr@redhat.com> - 7.93.25.EL-1
- Document HOTPLUG (#189509)
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