]> git.pld-linux.org Git - packages/watchdog.git/commitdiff
- don't try to load all modules - use only specified
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Tue, 12 Aug 2003 20:20:59 +0000 (20:20 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    watchdog.init -> 1.8
    watchdog.sysconfig -> 1.2

watchdog.init
watchdog.sysconfig

index 5916e9c3d746818a8d6100084f5c3f6b59d3dc99..f5635e5e6b8af00cf9fa4f5080809e47b126bb30 100644 (file)
@@ -30,12 +30,15 @@ case "$1" in
        if [ ! -f /var/lock/subsys/watchdog ]; then
                msg_starting watchdog
                busy
-               # 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 2>&1
-               modprobe pcwd >/dev/null 2>&1
-               modprobe acquirewdt >/dev/null 2>&1
+               
+               if [ -z "$WATCHDOG_MODULES" ]; then
+                   # preload software module
+                   modprobe -s softdog > /dev/null 2>&1
+               else
+                   for module in $WATCHDOG_MODULES ; do
+                       modprobe -s $module > /dev/null 2>&1
+                   done
+               fi
 
                if [ ${VERBOSE}="yes" ]; then
                        daemon watchdog -v
@@ -60,9 +63,15 @@ case "$1" in
                # 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
+               if [ -z "$WATCHDOG_MODULES" ]; then
+                   # try to unload software module
+                    rmmod -s softdog > /dev/null 2>&1
+                else
+                    for module in $WATCHDOG_MODULES ; do
+                        rmmod -s $module > /dev/null 2>&1
+                    done
+                fi
+
                rm -f /var/lock/subsys/watchdog >/dev/null 2>&1
        else
                msg_not_running watchdog
index 727dff995dbb0e21444391ef87cd0071f630e559..9c789c822e617e10ebe60c22ac5414fdca545a45 100644 (file)
@@ -6,3 +6,6 @@
 # VERBOSE  - Enables or disables verbose operation (logging to syslog)
 #
 VERBOSE=no
+
+# WATCHDOG_MODULES - list of watchdog modules to be preloaded (space separated)
+WATCHDOG_MODULES=
This page took 0.080124 seconds and 4 git commands to generate.