Blame SOURCES/0436-watchdog-Do-not-add-hooks-if-systemd-module-is-inclu.patch

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