aboutsummaryrefslogtreecommitdiffstats
path: root/core/busybox-initscripts/watchdog.initd
blob: 7363bb755324dadf6791500d0b1b4a1fa4ba38c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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 $?
}