diff options
| author | Bill Nottingham <notting@redhat.com> | 2004-09-17 20:36:22 +0000 |
|---|---|---|
| committer | Bill Nottingham <notting@redhat.com> | 2004-09-17 20:36:22 +0000 |
| commit | c7433f688c5d200ce7e42fba6e53bc0d0c96c647 (patch) | |
| tree | e62de32722c6c6f909c3defb0bbcab31f6c837be /sysconfig/network-scripts/ifup | |
| parent | a9f425e580d8b01f1ff95fd0e5660de8fdeed259 (diff) | |
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 41d8821a..aee876a4 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 } |
