Subversion Repositories ALCASAR

Rev

Rev 987 | Rev 1056 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 987 Rev 988
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
# $Id: alcasar-watchdog.sh 987 2012-08-17 21:41:28Z richard $
2
# $Id: alcasar-watchdog.sh 988 2012-08-20 21:33:01Z franck $
3
 
3
 
4
# alcasar-watchdog.sh
4
# alcasar-watchdog.sh
5
# by Rexy
5
# by Rexy
6
# This script is distributed under the Gnu General Public License (GPL)
6
# This script is distributed under the Gnu General Public License (GPL)
7
 
7
 
Line 60... Line 60...
60
		echo "ALCASAR watchdog is already running"
60
		echo "ALCASAR watchdog is already running"
61
		exit 0
61
		exit 0
62
	fi
62
	fi
63
	# EXTIF testing
63
	# EXTIF testing
64
	LAN_DOWN="0"
64
	LAN_DOWN="0"
65
	if [ "`/usr/sbin/ethtool $EXTIF|grep Link|cut -d' ' -f3`" != "yes" ]
65
	if [ "`/usr/sbin/ethtool $EXTIF|grep Link|cut -d' ' -f3`" != "yes" ] && [ "`/sbin/mii-tool $EXTIF | grep -i link | awk '{print $NF}'`" != "ok" ]
66
		then
66
		then
67
		LAN_DOWN="1"
67
		LAN_DOWN="1"
68
	fi
68
	fi
69
	# Default GW testing
69
	# Default GW testing
70
	if [ $LAN_DOWN -eq "0" ]
70
	if [ $LAN_DOWN -eq "0" ]