aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifup-eth
diff options
context:
space:
mode:
Diffstat (limited to 'sysconfig/network-scripts/ifup-eth')
-rwxr-xr-xsysconfig/network-scripts/ifup-eth8
1 files changed, 5 insertions, 3 deletions
diff --git a/sysconfig/network-scripts/ifup-eth b/sysconfig/network-scripts/ifup-eth
index 63b1e1e3..1e712b2d 100755
--- a/sysconfig/network-scripts/ifup-eth
+++ b/sysconfig/network-scripts/ifup-eth
@@ -39,12 +39,14 @@ is_available ${REALDEVICE}
# bail out, if the MAC does not fit
if [ -n "${HWADDR}" ]; then
FOUNDMACADDR=`get_hwaddr ${REALDEVICE}`
- if [ -n "${FOUNDMACADDR}" -a "${FOUNDMACADDR}" != "${HWADDR}" ]; then
+ if [ "${FOUNDMACADDR}" != "${HWADDR}" ]; then
curdev=`ip -o link | awk -F ':' -vIGNORECASE=1 "/$HWADDR/ { print \\$2 }"`
- [ -n "$curdev" ] && rename_device "${REALDEVICE}" "${HWADDR}" "${curdev}" || {
+ if [ -n "$curdev" ]; then
+ rename_device "${REALDEVICE}" "${HWADDR}" "${curdev}" || {
echo $"Device ${DEVICE} has different MAC address than expected, ignoring."
exit 1
- }
+ }
+ fi
fi
fi