aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2008-01-15 18:06:38 +0000
committerBill Nottingham <notting@redhat.com>2008-01-15 18:06:38 +0000
commit4912889cbc00cfe36945c7d57f8c15acf1f45333 (patch)
treeba8617ecc7e22298cd953c2721db33669f32aef0
parent9765374882bc40bb532fe7d0ef70cb46fa4fcf3e (diff)
downloadinitscripts-4912889cbc00cfe36945c7d57f8c15acf1f45333.tar
initscripts-4912889cbc00cfe36945c7d57f8c15acf1f45333.tar.gz
initscripts-4912889cbc00cfe36945c7d57f8c15acf1f45333.tar.bz2
initscripts-4912889cbc00cfe36945c7d57f8c15acf1f45333.tar.xz
initscripts-4912889cbc00cfe36945c7d57f8c15acf1f45333.zip
don't do something odd if we find a mac address that matches the user-set MACADDR (#251415)
-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 a1a8eff3..2f8257b2 100755
--- a/sysconfig/network-scripts/ifup
+++ b/sysconfig/network-scripts/ifup
@@ -158,7 +158,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 [ "${FOUNDMACADDR}" != "${HWADDR}" -a "${FOUNDMACADDR}" != "${MACADDR}" ]; 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."