From ce8b72f604079a5516a12f840ed6a64629b0131e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Pavl=C3=ADn?= Date: Mon, 17 Jun 2013 12:27:04 +0200 Subject: ifup-eth: print error only if arping is really called (#974603) --- sysconfig/network-scripts/ifup-eth | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'sysconfig') diff --git a/sysconfig/network-scripts/ifup-eth b/sysconfig/network-scripts/ifup-eth index bd524343..910ac9b8 100755 --- a/sysconfig/network-scripts/ifup-eth +++ b/sysconfig/network-scripts/ifup-eth @@ -225,11 +225,12 @@ else fi if ! LC_ALL=C ip addr ls ${REALDEVICE} | LC_ALL=C grep -q "${ipaddr[$idx]}/${prefix[$idx]}" ; then - [ "${REALDEVICE}" != "lo" ] && [ "${arpcheck[$idx]}" != "no" ] && \ - /sbin/arping -q -c 2 -w 3 -D -I ${REALDEVICE} ${ipaddr[$idx]} - if [ $? = 1 ]; then - net_log $"Error, some other host already uses address ${ipaddr[$idx]}." - exit 1 + if [ "${REALDEVICE}" != "lo" ] && [ "${arpcheck[$idx]}" != "no" ] ; then + /sbin/arping -q -c 2 -w 3 -D -I ${REALDEVICE} ${ipaddr[$idx]} + if [ $? = 1 ]; then + net_log $"Error, some other host already uses address ${ipaddr[$idx]}." + exit 1 + fi fi if ! ip addr add ${ipaddr[$idx]}/${prefix[$idx]} \ -- cgit v1.2.1