diff --git a/evocheck.sh b/evocheck.sh index 0c90051..734b2af 100755 --- a/evocheck.sh +++ b/evocheck.sh @@ -148,11 +148,15 @@ check_gitperms(){ check_advbase(){ if ls /etc/hostname.carp* 1> /dev/null 2>&1; then + bad_advbase=0 for advbase in $(ifconfig carp | grep advbase | awk -F 'advbase' '{print $2}' | awk '{print $1}' | xargs); do - if [[ "$advbase" -gt 1 ]]; then - failed "IS_ADVBASE" "At least one CARP interface has advbase greater than 5 seconds!" + if [[ "$advbase" -gt 5 ]]; then + bad_advbase=1 fi done + if [[ "$bad_advbase" -eq 1 ]]; then + failed "IS_ADVBASE" "At least one CARP interface has advbase greater than 5 seconds!" + fi fi }