68,11 → 68,17 |
# Default GW testing |
if [ $LAN_DOWN -eq "0" ] |
then |
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" ] |
GW_EXIST=`/sbin/ip route list|grep ^default|wc -l` |
if [ $GW_EXIST -eq "0" ] # no GW defined ! |
then |
LAN_DOWN="2" |
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 |
fi |
fi |
# if LAN pb detected, users are warned |