From 716ca530e1c4515d8683c9d5be3d56b301758b66 Mon Sep 17 00:00:00 2001 From: James <> Date: Wed, 4 Nov 2015 11:49:21 +0000 Subject: trunk-47381 --- target/linux/omap24xx/base-files/etc/init.d/watchdog | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 target/linux/omap24xx/base-files/etc/init.d/watchdog (limited to 'target/linux/omap24xx/base-files/etc/init.d/watchdog') 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 +} -- cgit v1.2.3