summaryrefslogtreecommitdiff
path: root/target/linux/omap24xx/base-files/etc/init.d/watchdog
diff options
context:
space:
mode:
authorMichael Büsch <mb@bu3sch.de>2010-08-08 18:36:38 +0000
committerMichael Büsch <mb@bu3sch.de>2010-08-08 18:36:38 +0000
commitf3c312ac0db8a204b2d207ddf1024fd4a8e0d91b (patch)
tree0379205a57f8b2b0cb7a9aeea34b46d436a8d982 /target/linux/omap24xx/base-files/etc/init.d/watchdog
parent249dff101c7614eec4435ab0e9923434eb9ea4cf (diff)
downloadmtk-20170518-f3c312ac0db8a204b2d207ddf1024fd4a8e0d91b.zip
mtk-20170518-f3c312ac0db8a204b2d207ddf1024fd4a8e0d91b.tar.gz
mtk-20170518-f3c312ac0db8a204b2d207ddf1024fd4a8e0d91b.tar.bz2
omap24xx: Add working inittab and watchdog init script
SVN-Revision: 22534
Diffstat (limited to 'target/linux/omap24xx/base-files/etc/init.d/watchdog')
-rwxr-xr-xtarget/linux/omap24xx/base-files/etc/init.d/watchdog15
1 files changed, 15 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 0000000..fa5dc43
--- /dev/null
+++ b/target/linux/omap24xx/base-files/etc/init.d/watchdog
@@ -0,0 +1,15 @@
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2008-2010 OpenWrt.org
+
+START=97
+start() {
+ if ! [ -c /dev/watchdog -a -x /sbin/watchdog ]; then
+ echo "WARNING: Watchdog not available. System will reboot soon!"
+ else
+ /sbin/watchdog -T 63 -t 53 /dev/watchdog
+ fi
+}
+
+stop() {
+ killall -q watchdog
+}