Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-6]: src/etc/rc.d Pull up revision 1.1 (new, requested by thorpe...



details:   https://anonhg.NetBSD.org/src/rev/04a059a70092
branches:  netbsd-1-6
changeset: 529338:04a059a70092
user:      he <he%NetBSD.org@localhost>
date:      Mon Nov 11 23:42:03 2002 +0000

description:
Pull up revision 1.1 (new, requested by thorpej in ticket #584):
  Add a wdogctl startup/shutdown script.

diffstat:

 etc/rc.d/wdogctl |  44 ++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 44 insertions(+), 0 deletions(-)

diffs (48 lines):

diff -r 8557acb30a57 -r 04a059a70092 etc/rc.d/wdogctl
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/rc.d/wdogctl  Mon Nov 11 23:42:03 2002 +0000
@@ -0,0 +1,44 @@
+#!/bin/sh
+#
+# $NetBSD: wdogctl,v 1.1.2.2 2002/11/11 23:42:03 he Exp $
+#
+
+# BEFORE:  disks
+
+# The watchdog is configured VERY early, so that any problems that
+# occur during the bootstrap process are protected by the watchdog.
+
+. /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"



Home | Main Index | Thread Index | Old Index