From f0a7fc5b434621033d4885ee9534867f2294524d Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 1 Aug 2012 12:49:45 +0200 Subject: [PATCH] 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. --- modules.d/04watchdog/module-setup.sh | 1 + modules.d/04watchdog/watchdog.sh | 5 +++++ 2 files changed, 6 insertions(+) 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 -- 2.47.3