2010-08-08 18:36:38 +00:00
|
|
|
#!/bin/sh /etc/rc.common
|
|
|
|
# Copyright (C) 2008-2010 OpenWrt.org
|
|
|
|
|
2011-03-06 10:40:04 +00:00
|
|
|
START=25
|
|
|
|
|
2010-08-08 18:36:38 +00:00
|
|
|
start() {
|
2011-03-06 10:40:04 +00:00
|
|
|
[ -c /dev/watchdog -a -x /sbin/watchdog ] || {
|
2010-08-08 18:36:38 +00:00
|
|
|
echo "WARNING: Watchdog not available. System will reboot soon!"
|
2011-03-06 10:40:04 +00:00
|
|
|
return 1
|
|
|
|
}
|
|
|
|
/sbin/watchdog -T 60 -t 50 /dev/watchdog
|
|
|
|
[ -x /usr/bin/schedtool ] && /usr/bin/schedtool -R -p 60 -n -20 $(pidof watchdog)
|
2010-08-08 18:36:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
stop() {
|
|
|
|
killall -q watchdog
|
|
|
|
}
|