aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/omap24xx/base-files/etc/init.d
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/omap24xx/base-files/etc/init.d')
-rwxr-xr-xtarget/linux/omap24xx/base-files/etc/init.d/watchdog17
1 files changed, 17 insertions, 0 deletions
diff --git a/target/linux/omap24xx/base-files/etc/init.d/watchdog b/target/linux/omap24xx/base-files/etc/init.d/watchdog
new file mode 100755
index 000000000..0d042c64e
--- /dev/null
+++ b/target/linux/omap24xx/base-files/etc/init.d/watchdog
@@ -0,0 +1,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 63 -t 50 /dev/watchdog
+ [ -x /usr/bin/schedtool ] && /usr/bin/schedtool -R -p 60 -n -20 $(pidof watchdog)
+}
+
+stop() {
+ killall -q watchdog
+}