aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifup-eth
diff options
context:
space:
mode:
authorVáclav Pavlín <vpavlin@redhat.com>2013-06-17 12:27:04 +0200
committerVáclav Pavlín <vpavlin@redhat.com>2013-06-17 12:29:58 +0200
commitce8b72f604079a5516a12f840ed6a64629b0131e (patch)
tree54bb001303451fa2ebbb38099339970ed1e485da /sysconfig/network-scripts/ifup-eth
parentc0e7b343b40a3527bbea33c39d1da9519cedd11f (diff)
downloadinitscripts-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-xsysconfig/network-scripts/ifup-eth11
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]} \