summaryrefslogtreecommitdiffstats
path: root/target/linux/omap24xx/base-files/etc/init.d/watchdog
blob: d1ad1a175292bda8d9e7b351eda5169965bdea7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh /etc/rc.common
# Copyright (C) 2008-2010 OpenWrt.org

START=25

start() {
	[ -c /dev/watchdog -a -x /sbin/watchdog ] || {
		echo "WARNING: Watchdog not available. System will reboot soon!"
		return 1
	}
	/sbin/watchdog -T 60 -t 50 /dev/watchdog
	[ -x /usr/bin/schedtool ] && /usr/bin/schedtool -R -p 60 -n -20 $(pidof watchdog)
}

stop() {
	killall -q watchdog
}