blob: bd1aba4d928c3c70b4a54d46ab88f2af2127c007 (
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
#!/bin/sh
#
# $NetBSD: wdogctl,v 1.4 2009/04/21 16:08:57 joerg Exp $
#
# PROVIDE: wdogctl
# BEFORE: fsck_root
# The watchdog is configured VERY early, so that any problems that
# occur during the bootstrap process are protected by the watchdog.
$_rc_subr_loaded . /etc/rc.subr
name="wdogctl"
rcvar=$name
start_cmd="watchdog_start"
stop_cmd="watchdog_stop"
status_cmd="watchdog_status"
extra_commands="status"
watchdog_start()
{
if [ x"${wdogctl_flags}" = "x" ]; then
warn "\${wdogctl_flags} is not set, watchdog not started"
else
echo "Starting watchdog timer."
/sbin/wdogctl ${wdogctl_flags}
fi
}
watchdog_stop()
{
echo "Stopping watchdog timer."
/sbin/wdogctl -d
}
watchdog_status()
{
/sbin/wdogctl
}
load_rc_config $name
run_rc_command "$1"
|