diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2013-07-19 09:13:06 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2013-07-19 09:13:06 +0000 |
commit | 8b63b64f4fd16c21acd47ae8751927b0ca785ecd (patch) | |
tree | dd7f36f6f29ee1d89203d93d22f75693e9ad0fe7 /main/busybox-initscripts/watchdog.initd | |
parent | 5aa71653044474a3fdc41dbed4a2e1a818d91093 (diff) | |
download | aports-8b63b64f4fd16c21acd47ae8751927b0ca785ecd.tar.bz2 aports-8b63b64f4fd16c21acd47ae8751927b0ca785ecd.tar.xz |
main/busybox-initscripts: use pidfile
Use the pidfile rather than exec name to stop services. This fixes
issue with qemu-arm
Diffstat (limited to 'main/busybox-initscripts/watchdog.initd')
-rw-r--r-- | main/busybox-initscripts/watchdog.initd | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/main/busybox-initscripts/watchdog.initd b/main/busybox-initscripts/watchdog.initd index 7363bb7553..986a113b83 100644 --- a/main/busybox-initscripts/watchdog.initd +++ b/main/busybox-initscripts/watchdog.initd @@ -1,25 +1,17 @@ #!/sbin/runscript +name="busybox watchdog" +command="/sbin/watchdog" +command_args="${WATCHDOG_OPTS} ${WATCHDOG_DEV}" +pidfile="/var/run/watchdog.pid" depend() { need dev after hwdrivers } -start() { +start_pre() { 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 $? } - |