0d042c64ea45fa81ccdfa4a47aef6c2a3088d43c
[openwrt/openwrt.git] / target / linux / omap24xx / base-files / etc / init.d / watchdog
1 #!/bin/sh /etc/rc.common
2 # Copyright (C) 2008-2010 OpenWrt.org
3
4 START=25
5
6 start() {
7 [ -c /dev/watchdog -a -x /sbin/watchdog ] || {
8 echo "WARNING: Watchdog not available. System will reboot soon!"
9 return 1
10 }
11 /sbin/watchdog -T 63 -t 50 /dev/watchdog
12 [ -x /usr/bin/schedtool ] && /usr/bin/schedtool -R -p 60 -n -20 $(pidof watchdog)
13 }
14
15 stop() {
16 killall -q watchdog
17 }