Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 2830 → Rev 2829

/scripts/alcasar-watchdog.sh
68,17 → 68,11
# Default GW testing
if [ $LAN_DOWN -eq "0" ]
then
GW_EXIST=`/sbin/ip route list|grep ^default|wc -l`
if [ $GW_EXIST -eq "0" ] # no GW defined !
IP_GW=`/sbin/ip route list|grep ^default|cut -d" " -f3`
arp_reply=`/usr/sbin/arping -I$EXTIF -c1 $IP_GW|grep response|cut -d" " -f2`
if [ $arp_reply -eq "0" ]
then
systemctl restart network
else
IP_GW=`/sbin/ip route list|grep ^default|cut -d" " -f3`
arp_reply=`/usr/sbin/arping -I$EXTIF -c1 $IP_GW|grep response|cut -d" " -f2`
if [ $arp_reply -eq "0" ]
then
LAN_DOWN="2"
fi
LAN_DOWN="2"
fi
fi
# if LAN pb detected, users are warned