aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig
diff options
context:
space:
mode:
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