Start the watchdog daemon if a harware watchdog is present
authorFlorian Fainelli <florian@openwrt.org>
Thu, 3 Apr 2008 14:36:10 +0000 (14:36 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Thu, 3 Apr 2008 14:36:10 +0000 (14:36 +0000)
SVN-Revision: 10721

package/base-files/files/etc/init.d/watchdog [new file with mode: 0755]

diff --git a/package/base-files/files/etc/init.d/watchdog b/package/base-files/files/etc/init.d/watchdog
new file mode 100755 (executable)
index 0000000..0821c8f
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2008 OpenWrt.org
+
+START=97
+start() {
+        [ -f /dev/watchtog ] && watchdog -t 5 /dev/watchdog
+}