diff options
author | James <> | 2015-11-04 11:49:21 +0000 |
---|---|---|
committer | James <> | 2015-11-04 11:49:21 +0000 |
commit | 716ca530e1c4515d8683c9d5be3d56b301758b66 (patch) | |
tree | 700eb5bcc1a462a5f21dcec15ce7c97ecfefa772 /target/linux/omap24xx/base-files/etc/init.d/watchdog | |
download | trunk-47381-716ca530e1c4515d8683c9d5be3d56b301758b66.tar.gz trunk-47381-716ca530e1c4515d8683c9d5be3d56b301758b66.tar.bz2 trunk-47381-716ca530e1c4515d8683c9d5be3d56b301758b66.zip |
Diffstat (limited to 'target/linux/omap24xx/base-files/etc/init.d/watchdog')
-rwxr-xr-x | target/linux/omap24xx/base-files/etc/init.d/watchdog | 17 |
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 0000000..0d042c6 --- /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 +} |