From: Harald Hoyer Date: Wed, 1 Aug 2012 10:49:45 +0000 (+0200) Subject: watchdog: set watchdog timeout with wdctl, if available X-Git-Tag: 023~8 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f0a7fc5b434621033d4885ee9534867f2294524d;p=thirdparty%2Fdracut.git watchdog: set watchdog timeout with wdctl, if available "wdctl -s" does not yet exist upstream. I patched util-linux/sys-utils/wdctl.c to set the timeout. --- diff --git a/modules.d/04watchdog/module-setup.sh b/modules.d/04watchdog/module-setup.sh index 5fc77f4e1..5eff3904c 100755 --- a/modules.d/04watchdog/module-setup.sh +++ b/modules.d/04watchdog/module-setup.sh @@ -23,5 +23,6 @@ install() { inst_hook cleanup 00 "$moddir/watchdog.sh" inst_hook cleanup 99 "$moddir/watchdog.sh" inst_hook emergency 02 "$moddir/watchdog-stop.sh" + dracut_install -o wdctl } diff --git a/modules.d/04watchdog/watchdog.sh b/modules.d/04watchdog/watchdog.sh index ed8cc930e..a3fdc265d 100755 --- a/modules.d/04watchdog/watchdog.sh +++ b/modules.d/04watchdog/watchdog.sh @@ -1,7 +1,12 @@ #!/bin/sh if [ -e /dev/watchdog ]; then + if [ ! -e /tmp/watchdog_timeout ]; then + wdctl -s 60 /dev/watchdog &>/dev/null + > /tmp/watchdog_timeout + fi info "Triggering watchdog" >/dev/watchdog else modprobe ib700wdt + modprobe i6300esb fi