aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifup
diff options
context:
space:
mode:
Diffstat (limited to 'sysconfig/network-scripts/ifup')
-rwxr-xr-xsysconfig/network-scripts/ifup2
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
}