File 0625-99base-enable-the-initqueue-in-both-dracut-add-devic.patch of Package dracut

From 0dabcd437afca4b690445624898d4233731147da Mon Sep 17 00:00:00 2001
From: Kairui Song <kasong@redhat.com>
Date: Mon, 20 Aug 2018 18:43:19 +0800
Subject: [PATCH] 99base: enable the initqueue in both 'dracut --add-device'
 and 'dracut --mount' cases.

The commit 9f3c31cd8d68 ("99base: enable initqueue if extra devices are added")
only covers 'dracut --add-device' case, but it did not cover 'dracut --mount'
case, which causes the kdump failure in the Amazon virtual machine.

Lets make sure that the initqueue is enabled in both cases in order to wake up
the device in time.

Reported-by: Xiao Liang <xiliang@redhat.com>
Signed-off-by: Lianbo Jiang <lijiang@redhat.com>
(cherry picked from commit 9f3c31cd8d68b5272f803063247362a644720227)
(cherry picked from commit 84c862d8f3993c93a3e90c70e7a05fdd8ca4a86f)
---
 modules.d/99base/module-setup.sh | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules.d/99base/module-setup.sh b/modules.d/99base/module-setup.sh
index db47be1b..d29b86f2 100755
--- a/modules.d/99base/module-setup.sh
+++ b/modules.d/99base/module-setup.sh
@@ -96,6 +96,9 @@ install() {
 
     ## save host_devs which we need bring up
     if [[ $hostonly_cmdline == "yes" ]]; then
+        if [[ -n "${host_devs[@]}" ]]; then
+            dracut_need_initqueue
+        fi
         if [[ -f "$initdir/lib/dracut/need-initqueue" ]] || ! dracut_module_included "systemd"; then
             (
                 if dracut_module_included "systemd"; then
-- 
2.26.2

openSUSE Build Service is sponsored by