diff options
author | Bill Nottingham <notting@redhat.com> | 2004-09-17 20:37:59 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2004-09-17 20:37:59 +0000 |
commit | ba499ce66072b2ab21aaf9ffef9370e1df29044d (patch) | |
tree | a74f38355f4be41936beb79c0f4a57503786fe82 /sysconfig/network-scripts/ifup | |
parent | 09693644d6969511e9bae741b934d07159335e50 (diff) | |
download | initscripts-ba499ce66072b2ab21aaf9ffef9370e1df29044d.tar initscripts-ba499ce66072b2ab21aaf9ffef9370e1df29044d.tar.gz initscripts-ba499ce66072b2ab21aaf9ffef9370e1df29044d.tar.bz2 initscripts-ba499ce66072b2ab21aaf9ffef9370e1df29044d.tar.xz initscripts-ba499ce66072b2ab21aaf9ffef9370e1df29044d.zip |
fix handling of nonexistent devices (#132839)
Diffstat (limited to 'sysconfig/network-scripts/ifup')
-rwxr-xr-x | sysconfig/network-scripts/ifup | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sysconfig/network-scripts/ifup b/sysconfig/network-scripts/ifup index b4a42aeb..49c82c06 100755 --- a/sysconfig/network-scripts/ifup +++ b/sysconfig/network-scripts/ifup @@ -148,7 +148,7 @@ if [ -n "${HWADDR}" ]; then FOUNDMACADDR=`get_hwaddr ${REALDEVICE}` if [ "${FOUNDMACADDR}" != "${HWADDR}" ]; then curdev=`ip -o link | awk -F ':' -vIGNORECASE=1 '/$HWADDR/ { print $2 }'` - rename_device "${REALDEVICE}" "${HWADDR}" "${curdev}" || { + [ -n "$curdev" ] && rename_device "${REALDEVICE}" "${HWADDR}" "${curdev}" || { echo $"Device ${DEVICE} has different MAC address than expected, ignoring." exit 1 } |