From 9f38f0eeba5d63c36e910cde44b9bc59c2b5aba3 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Tue, 24 Jun 2003 04:13:19 +0000 Subject: more tweaks - encapsulate grabing the hw addr into its own function - normalize case of all hwaddrs - if we are passed a device with no config, see if there's a config for that hwaddr --- sysconfig/network-scripts/ifdown | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'sysconfig/network-scripts/ifdown') diff --git a/sysconfig/network-scripts/ifdown b/sysconfig/network-scripts/ifdown index 4e490f68..65ef52e1 100755 --- a/sysconfig/network-scripts/ifdown +++ b/sysconfig/network-scripts/ifdown @@ -50,10 +50,9 @@ fi check_device_down ${DEVICE} && [ "$BOOTPROTO" != "dhcp" -a "$BOOTPROTO" != "bootp" ] && [ -n "$VLAN" -a "$VLAN" != "yes" ] && exit 0 if [ -n "${HWADDR}" ]; then - FOUNDMACADDR=`LC_ALL= LANG= ip -o link show ${REALDEVICE} | \ - sed 's/.*link\/ether \([[:alnum:]:]*\).*/\1/'` + FOUNDMACADDR=`get_hwaddr ${REALDEVICE}` if [ "${FOUNDMACADDR}" != "${HWADDR}" ]; then - NEWCONFIG=`fgrep -l "HWADDR=${HWADDR}" /etc/sysconfig/network-scripts/ifcfg-*` + NEWCONFIG=`fgrep -il "HWADDR=${HWADDR}" /etc/sysconfig/network-scripts/ifcfg-*` if [ -n "${NEWCONFIG}" -a "${NEWCONFIG}" != "${CONFIG}" ]; then exec /sbin/ifdown ${NEWCONFIG} else -- cgit v1.2.1