From 06a32c9862b2276c451778e2e5c45fbba77e2dae Mon Sep 17 00:00:00 2001 From: Lianbo Jiang Date: Dec 10 2020 10:20:58 +0000 Subject: 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 Signed-off-by: Lianbo Jiang (cherry picked from commit e0fc62f619ba55a96179382e22f7665e969c3d42) Resolves: #1678094 patch_name: 0022.patch present_in_specfile: true location_in_specfile: 22 squash_commits: true --- diff --git a/modules.d/99base/module-setup.sh b/modules.d/99base/module-setup.sh index 21523fc..c9ead01 100755 --- a/modules.d/99base/module-setup.sh +++ b/modules.d/99base/module-setup.sh @@ -93,7 +93,7 @@ install() { ## save host_devs which we need bring up if [[ $hostonly_cmdline == "yes" ]]; then - if [[ -n $add_device ]]; then + if [[ -n "${host_devs[@]}" ]]; then dracut_need_initqueue fi if [[ -f "$initdir/lib/dracut/need-initqueue" ]] || ! dracut_module_included "systemd"; then