diff --git a/tests/p_arpwatch/10_arpwatch_test.sh b/tests/p_arpwatch/10_arpwatch_test.sh index 9f518a5..aea3d40 100755 --- a/tests/p_arpwatch/10_arpwatch_test.sh +++ b/tests/p_arpwatch/10_arpwatch_test.sh @@ -1,13 +1,21 @@ #!/bin/sh -# Christoph Galuschka +# Author: Christoph Galuschka +# Rene Diepstraten -t_Log "Running $0 - arpwatch on eth0" +t_Log "Running $0 - arpwatch on interface with default gateway" + +# arpwatch is broken in el7 +# See https://bugzilla.redhat.com/show_bug.cgi?id=1044062 +[[ $centos_ver -eq 7 ]] && { + t_Log "arpwatch is broken on el7. Skipping test." + exit +} # Kill arpwatch instance from previous test # killall arpwatch # getting IP-address of default gateway -defgw=$(route -n | grep 'UG[ \t]' | awk '{print $2}') +defgw=$(ip route | awk '/^default via/ {print $3}') if [ -z $defgw ] then t_Log "No default gateway, can't test arpwatch" @@ -30,7 +38,6 @@ sleep 4 ping -q -i 1 -c 5 $defgw killall arpwatch sleep 2 -more $arpdat grep -q $defgw $arpdat t_CheckExitStatus $?