wdogctl revision 1.1
1#!/bin/sh
2#
3# $NetBSD: wdogctl,v 1.1 2002/07/30 05:58:43 thorpej Exp $
4#
5
6# BEFORE:  disks
7
8# The watchdog is configured VERY early, so that any problems that
9# occur during the bootstrap process are protected by the watchdog.
10
11. /etc/rc.subr
12
13name="wdogctl"
14rcvar=$name
15
16start_cmd="watchdog_start"
17stop_cmd="watchdog_stop"
18status_cmd="watchdog_status"
19
20extra_commands="status"
21
22watchdog_start()
23{
24	if [ x"${wdogctl_flags}" = "x" ]; then
25		warn "\${wdogctl_flags} is not set, watchdog not started"
26	else
27		echo "Starting watchdog timer."
28		/sbin/wdogctl ${wdogctl_flags}
29	fi
30}
31
32watchdog_stop()
33{
34	echo "Stopping watchdog timer."
35	/sbin/wdogctl -d
36}
37
38watchdog_status()
39{
40	/sbin/wdogctl
41}
42
43load_rc_config $name
44run_rc_command "$1"
45