diff options
Diffstat (limited to 'package/busybox/files')
-rw-r--r-- | package/busybox/files/busybox.postinst | 1 | ||||
-rw-r--r-- | package/busybox/files/watchdog.init | 27 |
2 files changed, 28 insertions, 0 deletions
diff --git a/package/busybox/files/busybox.postinst b/package/busybox/files/busybox.postinst index 90ddf9d42..761fb777d 100644 --- a/package/busybox/files/busybox.postinst +++ b/package/busybox/files/busybox.postinst @@ -2,5 +2,6 @@ . $IPKG_INSTROOT/etc/functions.sh add_rcconf network network YES add_rcconf crond crond NO +add_rcconf watchdog watchdog NO add_rcconf 'use "-C32" normally, "NO" to disable' syslogd_flags '-C32' add_rcconf inetd 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 $? |