7d2e1537c5
for a speedup by doing: $_rc_subr_loaded . /etc/rc.subr
45 lines
746 B
Bash
Executable File
45 lines
746 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# $NetBSD: wdogctl,v 1.2 2004/08/13 18:08:03 mycroft Exp $
|
|
#
|
|
|
|
# BEFORE: disks
|
|
|
|
# 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"
|