Blame 0036-watchdog-Do-not-add-hooks-if-systemd-module-is-inclu.patch

Harald Hoyer b38677
From 89da227de991ef3c1bb9ad3dc4f23d07535317d2 Mon Sep 17 00:00:00 2001
Harald Hoyer b38677
From: Pratyush Anand <panand@redhat.com>
Harald Hoyer b38677
Date: Wed, 16 Mar 2016 09:09:09 +0530
Harald Hoyer b38677
Subject: [PATCH] watchdog: Do not add hooks if systemd module is included
Harald Hoyer b38677
Harald Hoyer b38677
When systemd is present, let it manage watchdog feed.
Harald Hoyer b38677
Harald Hoyer b38677
Signed-off-by: Pratyush Anand <panand@redhat.com>
Harald Hoyer b38677
Cc: Dave Young <dyoung@redhat.com>
Harald Hoyer b38677
Cc: Don Zickus <dzickus@redhat.com>
Harald Hoyer b38677
Cc: Harald Hoyer <harald@redhat.com>
Harald Hoyer b38677
---
Harald Hoyer b38677
 modules.d/04watchdog/module-setup.sh | 5 +++++
Harald Hoyer b38677
 1 file changed, 5 insertions(+)
Harald Hoyer b38677
Harald Hoyer b38677
diff --git a/modules.d/04watchdog/module-setup.sh b/modules.d/04watchdog/module-setup.sh
Harald Hoyer b38677
index 576c589..7ec757a 100755
Harald Hoyer b38677
--- a/modules.d/04watchdog/module-setup.sh
Harald Hoyer b38677
+++ b/modules.d/04watchdog/module-setup.sh
Harald Hoyer b38677
@@ -12,6 +12,11 @@ depends() {
Harald Hoyer b38677
 
Harald Hoyer b38677
 # called by dracut
Harald Hoyer b38677
 install() {
Harald Hoyer b38677
+    # Do not add watchdog hooks if systemd module is included
Harald Hoyer b38677
+    # In that case, systemd will manage watchdog kick
Harald Hoyer b38677
+    if dracut_module_included "systemd"; then
Harald Hoyer b38677
+	    return
Harald Hoyer b38677
+    fi
Harald Hoyer b38677
     inst_hook cmdline   00 "$moddir/watchdog.sh"
Harald Hoyer b38677
     inst_hook cmdline   50 "$moddir/watchdog.sh"
Harald Hoyer b38677
     inst_hook pre-trigger 00 "$moddir/watchdog.sh"