aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifup
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2003-08-08 02:25:10 +0000
committerBill Nottingham <notting@redhat.com>2003-08-08 02:25:10 +0000
commitb2b39c14155d39014d40a70f7d98c6d0da0c8257 (patch)
treec44e2b1ae5c083f2d7328196f5948195a73a85de /sysconfig/network-scripts/ifup
parent36159bf2210286f3f61340c7ee6816118e81219c (diff)
downloadinitscripts-b2b39c14155d39014d40a70f7d98c6d0da0c8257.tar
initscripts-b2b39c14155d39014d40a70f7d98c6d0da0c8257.tar.gz
initscripts-b2b39c14155d39014d40a70f7d98c6d0da0c8257.tar.bz2
initscripts-b2b39c14155d39014d40a70f7d98c6d0da0c8257.tar.xz
initscripts-b2b39c14155d39014d40a70f7d98c6d0da0c8257.zip
fix ethernet device renaming deadlock (yay recursion!) (#101566)
Diffstat (limited to 'sysconfig/network-scripts/ifup')
-rwxr-xr-xsysconfig/network-scripts/ifup3
1 files changed, 2 insertions, 1 deletions
diff --git a/sysconfig/network-scripts/ifup b/sysconfig/network-scripts/ifup
index 2a2e955c..9c6945ad 100755
--- a/sysconfig/network-scripts/ifup
+++ b/sysconfig/network-scripts/ifup
@@ -143,7 +143,8 @@ is_available ${REALDEVICE}
if [ -n "${HWADDR}" ]; then
FOUNDMACADDR=`get_hwaddr ${REALDEVICE}`
if [ "${FOUNDMACADDR}" != "${HWADDR}" ]; then
- /sbin/nameif "${REALDEVICE}" "${HWADDR}" || {
+ local curdev=`ip -o link | awk -F ':' -vIGNORECASE=1 '/$HWADDR/ { print $2 }'`
+ rename_device "${REALDEVICE}" "${HWADDR}" "${curdev}" || {
echo $"Device ${DEVICE} has different MAC address than expected, ignoring."
exit 1
}