diff options
author | Václav Pavlín <vpavlin@redhat.com> | 2013-06-17 12:27:04 +0200 |
---|---|---|
committer | Václav Pavlín <vpavlin@redhat.com> | 2013-06-17 12:29:58 +0200 |
commit | ce8b72f604079a5516a12f840ed6a64629b0131e (patch) | |
tree | 54bb001303451fa2ebbb38099339970ed1e485da /sysconfig/network-scripts/ifup-eth | |
parent | c0e7b343b40a3527bbea33c39d1da9519cedd11f (diff) | |
download | initscripts-ce8b72f604079a5516a12f840ed6a64629b0131e.tar initscripts-ce8b72f604079a5516a12f840ed6a64629b0131e.tar.gz initscripts-ce8b72f604079a5516a12f840ed6a64629b0131e.tar.bz2 initscripts-ce8b72f604079a5516a12f840ed6a64629b0131e.tar.xz initscripts-ce8b72f604079a5516a12f840ed6a64629b0131e.zip |
ifup-eth: print error only if arping is really called (#974603)
Diffstat (limited to 'sysconfig/network-scripts/ifup-eth')
-rwxr-xr-x | sysconfig/network-scripts/ifup-eth | 11 |
1 files changed, 6 insertions, 5 deletions
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]} \ |