From 928b827148952fbbb7ef052f35a8a3cadd2257db Mon Sep 17 00:00:00 2001 From: Christoph Galuschka Date: Jul 10 2013 18:55:36 +0000 Subject: Merge commit 'refs/merge-requests/38' of git://gitorious.org/testautomation/t_functional into merge-requests/38 --- diff --git a/tests/p_arpwatch/arpwatch_test.sh b/tests/p_arpwatch/arpwatch_test.sh index 3a7eebf..fd9ec86 100755 --- a/tests/p_arpwatch/arpwatch_test.sh +++ b/tests/p_arpwatch/arpwatch_test.sh @@ -7,7 +7,12 @@ t_Log "Running $0 - arpwatch on eth0" killall arpwatch # getting IP-address of default gateway -defgw=$(ip route list | grep default | cut -d' ' -f3) +defgw=$(route -n | grep 'UG[ \t]' | awk '{print $2}') +if [ -z $defgw ] + then + t_Log "No default gateway, can't test arpwatch" + exit +fi # setting path to arp.dat if (t_GetPkgRel basesystem | grep -q el5)