From b6a3a1dd5d783229a2bb6e42993fe6b09e0583d2 Mon Sep 17 00:00:00 2001 From: Lukas Nykryn Date: Tue, 5 Jan 2016 13:35:21 +0100 Subject: ifup-eth: if arping fails, output responding MAC Resolves: #1099026 --- sysconfig/network-scripts/ifup-eth | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sysconfig/network-scripts/ifup-eth') diff --git a/sysconfig/network-scripts/ifup-eth b/sysconfig/network-scripts/ifup-eth index 8130b3cb..4d022f76 100755 --- a/sysconfig/network-scripts/ifup-eth +++ b/sysconfig/network-scripts/ifup-eth @@ -251,9 +251,10 @@ else if ! LC_ALL=C ip addr ls ${REALDEVICE} | LC_ALL=C grep -q "${ipaddr[$idx]}/${prefix[$idx]}" ; then if [ "${REALDEVICE}" != "lo" ] && [ "${arpcheck[$idx]}" != "no" ] ; then - /sbin/arping -q -c 2 -w ${ARPING_WAIT:-3} -D -I ${REALDEVICE} ${ipaddr[$idx]} + ARPING=$(/sbin/arping -c 2 -w ${ARPING_WAIT:-3} -D -I ${REALDEVICE} ${ipaddr[$idx]}) if [ $? = 1 ]; then - net_log $"Error, some other host already uses address ${ipaddr[$idx]}." + ARPINGMAC=$(echo $ARPING | sed -ne 's/.*\[\(.*\)\].*/\1/p') + net_log $"Error, some other host ($ARPINGMAC) already uses address ${ipaddr[$idx]}." exit 1 fi fi -- cgit v1.2.1