diff options
author | Bill Nottingham <notting@redhat.com> | 2005-04-15 19:34:15 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2005-04-15 19:34:15 +0000 |
commit | 466959510334b0977d24da11de639cf2c2714b7d (patch) | |
tree | b8cdc66090dd70f0d5d0e12ae3e895d616162dc4 | |
parent | 79575edf7439d0c81b311d51a44c0dd3528fae12 (diff) | |
download | initscripts-466959510334b0977d24da11de639cf2c2714b7d.tar initscripts-466959510334b0977d24da11de639cf2c2714b7d.tar.gz initscripts-466959510334b0977d24da11de639cf2c2714b7d.tar.bz2 initscripts-466959510334b0977d24da11de639cf2c2714b7d.tar.xz initscripts-466959510334b0977d24da11de639cf2c2714b7d.zip |
- always return errors on trying to bring up nonexistent devices (#131461)
- fix error message (#143674)
-rwxr-xr-x | sysconfig/network-scripts/ifup-eth | 8 |
1 files changed, 4 insertions, 4 deletions
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 |