summaryrefslogtreecommitdiff
path: root/package/busybox/files/watchdog.init
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2010-01-19 21:02:56 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2010-01-19 21:02:56 +0100
commitd2be2bd2fc1c6e5dcdf8fc845a88e02423a0574b (patch)
tree93a3d908a3baa935639fccbb2bda38da025333ad /package/busybox/files/watchdog.init
parentfe290120f43280123c7adb84d64745cc2a0cced0 (diff)
enable watchdog driver and busybox userland
does not work yet on alix1c.
Diffstat (limited to 'package/busybox/files/watchdog.init')
-rw-r--r--package/busybox/files/watchdog.init27
1 files changed, 27 insertions, 0 deletions
diff --git a/package/busybox/files/watchdog.init b/package/busybox/files/watchdog.init
new file mode 100644
index 000000000..c5d0e9545
--- /dev/null
+++ b/package/busybox/files/watchdog.init
@@ -0,0 +1,27 @@
+#!/bin/sh
+#PKG busybox
+#INIT 10
+. /etc/rc.conf
+
+case $1 in
+autostop) ;;
+autostart)
+ [[ $watchdog = NO ]] && exit 0
+ exec sh $0 start
+ ;;
+start)
+ watchdog /dev/watchdog
+ ;;
+stop)
+ pkill watchdog
+ ;;
+restart)
+ sh $0 stop
+ sh $0 start
+ ;;
+*)
+ echo "Usage: $0 {start | stop | restart}"
+ exit 1
+ ;;
+esac
+exit $?