]> git.pld-linux.org Git - packages/watchdog.git/commitdiff
aed04b6789fc592a401c05b8f3828a16 SOURCES/watchdog-5.2.tar.gz
authorPaweł Gołaszewski <blues@pld-linux.org>
Fri, 21 Dec 2001 09:45:09 +0000 (09:45 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    watchdog.init -> 1.1
    watchdog.sysconfig -> 1.1

watchdog.init [new file with mode: 0644]
watchdog.sysconfig [new file with mode: 0644]

diff --git a/watchdog.init b/watchdog.init
new file mode 100644 (file)
index 0000000..ca914bf
--- /dev/null
@@ -0,0 +1,84 @@
+#! /bin/sh
+#
+# chkconfig: 12345 02 98
+# description: A software watchdog
+# rc file author: Marc Merlin <marcsoft@merlins.org>
+#                 Henning P. Schmiedehausen <hps@tanstaafl.de>
+# Note that even though chkconfig says that this should be run at runlevel 1,
+# RH by default won't do this, so the RPM applies an ugly patch to 
+# /etc/rc.d/init.d/single so that if you go from RL 3 to RL 1, watchdog is
+# restarted anyway (if it's not, it can cause the kernel to reboot your machine
+# depending on whether your kernel was compiled with CONFIG_WATCHDOG_NOWAYOUT)
+#
+# I have filed a bug with RH about this, and I hope they will change their
+# single script to allow for other scripts to be run in RL 1.
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+[ -x /usr/sbin/watchdog -a -e /etc/watchdog.conf ] || exit 0
+
+VERBOSE="no"
+if [ -f /etc/sysconfig/watchdog ]; then
+    . /etc/sysconfig/watchdog
+fi
+
+# See how we were called.
+case "$1" in
+  start)
+       if [ ! -f /var/lock/subsys/watchdog ]; then
+               msg_starting watchdog
+               # For some people it is a module, for others not. We force it because
+               # for kernels < 2.1, we need kerneld, and it's not running yet.
+
+               modprobe softdog &>/dev/null
+               modprobe pcwd &>/dev/null
+               modprobe acquirewdt &>/dev/null
+
+               if [ ${VERBOSE}="yes" ]; then
+                       daemon watchdog -v
+               else
+                       daemon watchdog
+               fi
+               echo
+               RETVAL=$?
+               [ $RETVAL -eq 0 ] && touch /var/lock/subsys/watchdog
+       else
+               msg_Already_Running watchdog
+       fi
+       ;;
+  stop)
+       if [ -f /var/lock/subsys/watchdog ]; then
+               msg_stopping watchdog
+               killproc watchdog
+        # If you compiled your kernel with CONFIG_WATCHDOG_NOWAYOUT, you may
+        # not want  to remove the module  as sometimes /etc/rc.d/init.d/halt
+        # will hang on umounting some remote nfs partition or for some other
+        # reason, and you may then want the kernel to reboot by itself.
+        # However, this means that if you stop watchdog, your system has one
+        # minute to reboot cleanly, or it will be rebooted by the kernel. If
+        # this behavior  isn't what you  want, just uncomment  the following
+        # lines
+       rmmod softdog &>/dev/null
+       rmmod pcwd &>/dev/null
+       rmmod acquirewdt &>/dev/null
+               rm -f /var/lock/subsys/watchdog >/dev/null 2>&1
+       else
+               msg_Not_Running watchdog
+               exit 1
+       fi
+       ;;
+  status)
+       status watchdog
+       ;;
+  restart|reload)
+       /etc/rc.d/init.d/watchdog stop
+       /etc/rc.d/init.d/watchdog start
+       ;;
+  *)
+       echo "Usage: watchdog {start|stop|status|restart|reload}"
+       exit 1
+       ;;
+esac
+
+exit 0
diff --git a/watchdog.sysconfig b/watchdog.sysconfig
new file mode 100644 (file)
index 0000000..727dff9
--- /dev/null
@@ -0,0 +1,8 @@
+#
+# /etc/sysconfig/watchdog
+#
+# Controls the behaviour of the watchdog
+#
+# VERBOSE  - Enables or disables verbose operation (logging to syslog)
+#
+VERBOSE=no
This page took 0.070217 seconds and 4 git commands to generate.