summaryrefslogtreecommitdiffstats
path: root/main/busybox-initscripts/watchdog.initd
diff options
context:
space:
mode:
Diffstat (limited to 'main/busybox-initscripts/watchdog.initd')
-rw-r--r--main/busybox-initscripts/watchdog.initd25
1 files changed, 25 insertions, 0 deletions
diff --git a/main/busybox-initscripts/watchdog.initd b/main/busybox-initscripts/watchdog.initd
new file mode 100644
index 00000000..7363bb75
--- /dev/null
+++ b/main/busybox-initscripts/watchdog.initd
@@ -0,0 +1,25 @@
+#!/sbin/runscript
+
+depend() {
+ need dev
+ after hwdrivers
+}
+
+start() {
+ if ! [ -n "$WATCHDOG_DEV" ]; then
+ eerror "WATCHDOG_DEV is not set"
+ return 1
+ fi
+
+ ebegin "Starting busybox watchdog"
+ start-stop-daemon --start --exec /sbin/watchdog \
+ -- $WATCHDOG_OPTS $WATCHDOG_DEV
+ eend $?
+}
+
+stop () {
+ ebegin "Stopping busybox watchdog"
+ start-stop-daemon --stop --exec /sbin/watchdog
+ eend $?
+}
+