Subversion Repositories ALCASAR

Rev

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

Rev 783 Rev 784
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
# $Id: alcasar-watchdog.sh 783 2011-12-17 14:24:08Z richard $
2
# $Id: alcasar-watchdog.sh 784 2011-12-18 14:33:56Z richard $
3
 
3
 
4
# alcasar-watchdog.sh
4
# alcasar-watchdog.sh
5
# by Richard REY
5
# by Richard REY
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 47... Line 47...
47
}
47
}
48
 
48
 
49
function lan_test ()
49
function lan_test ()
50
# LAN connectiivity testing
50
# LAN connectiivity testing
51
{
51
{
-
 
52
	watchdog_process=`ps -C alcasar-watchdog.sh|wc -l`
-
 
53
	if [[ $(expr $watchdog_process) -gt 3 ]]
-
 
54
		then
-
 
55
		echo "ALCASAR watchdog is already running"
-
 
56
		exit 0
-
 
57
	fi
52
	# EXTIF testing
58
	# EXTIF testing
53
	LAN_DOWN="0"
59
	LAN_DOWN="0"
54
	if [ "`/usr/sbin/ethtool $EXTIF|grep Link|cut -d' ' -f3`" != "yes" ]
60
	if [ "`/usr/sbin/ethtool $EXTIF|grep Link|cut -d' ' -f3`" != "yes" ]
55
		then
61
		then
56
		LAN_DOWN="1"
62
		LAN_DOWN="1"