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
# 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