From d2be2bd2fc1c6e5dcdf8fc845a88e02423a0574b Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Tue, 19 Jan 2010 21:02:56 +0100 Subject: enable watchdog driver and busybox userland does not work yet on alix1c. --- package/busybox/Makefile | 2 +- package/busybox/config/miscutils/Config.in | 2 +- package/busybox/files/busybox.postinst | 1 + package/busybox/files/watchdog.init | 27 +++++++++++++++++++++++++++ 4 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 package/busybox/files/watchdog.init (limited to 'package/busybox') diff --git a/package/busybox/Makefile b/package/busybox/Makefile index 2a9ef5e14..37f50bdd6 100644 --- a/package/busybox/Makefile +++ b/package/busybox/Makefile @@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:= busybox PKG_VERSION:= 1.15.2 -PKG_RELEASE:= 1 +PKG_RELEASE:= 2 PKG_MD5SUM:= 495e320537f0772125f2db3c098e437c PKG_DESCR:= Core utilities for embedded Linux systems PKG_SECTION:= base diff --git a/package/busybox/config/miscutils/Config.in b/package/busybox/config/miscutils/Config.in index eeb0d6d34..8346391a9 100644 --- a/package/busybox/config/miscutils/Config.in +++ b/package/busybox/config/miscutils/Config.in @@ -617,7 +617,7 @@ config BUSYBOX_VOLNAME config BUSYBOX_WATCHDOG bool "watchdog" depends on !ADK_PACKAGE_WATCHDOG - default n + default y help The watchdog utility is used with hardware or software watchdog device drivers. It opens the specified watchdog device special file 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 $? -- cgit v1.2.3