From a47b5d0d87dcd789baa6449eb62ead41645e96c6 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Tue, 28 Feb 2006 23:43:04 +0000 Subject: array variables are bad. use $IFS with '/', as that is illegal in net device names. coalesce some things into a function. --- sysconfig/network-scripts/ifup-eth | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sysconfig/network-scripts/ifup-eth') diff --git a/sysconfig/network-scripts/ifup-eth b/sysconfig/network-scripts/ifup-eth index 45efb881..d66ba5af 100755 --- a/sysconfig/network-scripts/ifup-eth +++ b/sysconfig/network-scripts/ifup-eth @@ -40,7 +40,7 @@ is_available ${REALDEVICE} if [ -n "${HWADDR}" ]; then FOUNDMACADDR=`get_hwaddr ${REALDEVICE}` if [ "${FOUNDMACADDR}" != "${HWADDR}" ]; then - curdev=`ip -o link | grep -v link/ieee802.11 | awk -F ': ' -vIGNORECASE=1 "/$HWADDR/ { print \\$2 }"` + curdev=`get_device_by_hwaddr ${HWADDR}` if [ -n "$curdev" ]; then rename_device "${REALDEVICE}" "${HWADDR}" "${curdev}" || { echo $"Device ${DEVICE} has different MAC address than expected, ignoring." -- cgit v1.2.1