]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
watchdog: Do not add hooks if systemd module is included
authorPratyush Anand <panand@redhat.com>
Wed, 16 Mar 2016 03:39:09 +0000 (09:09 +0530)
committerHarald Hoyer <harald@redhat.com>
Wed, 16 Mar 2016 04:05:51 +0000 (05:05 +0100)
When systemd is present, let it manage watchdog feed.

Signed-off-by: Pratyush Anand <panand@redhat.com>
Cc: Dave Young <dyoung@redhat.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Harald Hoyer <harald@redhat.com>
modules.d/04watchdog/module-setup.sh

index 576c589c198d240b0b2fc990e8f35f074a22806d..7ec757aec0323a4278b52a9d1240b528e04dc985 100755 (executable)
@@ -12,6 +12,11 @@ depends() {
 
 # called by dracut
 install() {
+    # Do not add watchdog hooks if systemd module is included
+    # In that case, systemd will manage watchdog kick
+    if dracut_module_included "systemd"; then
+           return
+    fi
     inst_hook cmdline   00 "$moddir/watchdog.sh"
     inst_hook cmdline   50 "$moddir/watchdog.sh"
     inst_hook pre-trigger 00 "$moddir/watchdog.sh"