From 466959510334b0977d24da11de639cf2c2714b7d Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Fri, 15 Apr 2005 19:34:15 +0000 Subject: - always return errors on trying to bring up nonexistent devices (#131461) - fix error message (#143674) --- sysconfig/network-scripts/ifup-eth | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sysconfig/network-scripts') diff --git a/sysconfig/network-scripts/ifup-eth b/sysconfig/network-scripts/ifup-eth index 432f0d2d..63b1e1e3 100755 --- a/sysconfig/network-scripts/ifup-eth +++ b/sysconfig/network-scripts/ifup-eth @@ -39,7 +39,7 @@ is_available ${REALDEVICE} # bail out, if the MAC does not fit if [ -n "${HWADDR}" ]; then FOUNDMACADDR=`get_hwaddr ${REALDEVICE}` - if [ "${FOUNDMACADDR}" != "${HWADDR}" ]; then + if [ -n "${FOUNDMACADDR}" -a "${FOUNDMACADDR}" != "${HWADDR}" ]; then curdev=`ip -o link | awk -F ':' -vIGNORECASE=1 "/$HWADDR/ { print \\$2 }"` [ -n "$curdev" ] && rename_device "${REALDEVICE}" "${HWADDR}" "${curdev}" || { echo $"Device ${DEVICE} has different MAC address than expected, ignoring." @@ -79,12 +79,12 @@ fi # now check the real state is_available ${REALDEVICE} || { - if [ "$?" = "1" ] ; then + if [ -n "$alias" ]; then echo $"$alias device ${DEVICE} does not seem to be present, delaying initialization." - exit 1 else - exit 0 + echo $"Device ${DEVICE} does not seem to be present, delaying initialization." fi + exit 1 } # is the device wireless? If so, configure wireless device specifics -- cgit v1.2.1