Blame SOURCES/0508-rootfs-block-module-setup.sh-check-root_dev-in-cmdli.patch

5c6c2a
From e2afcc958be19287bc23d9c0a052b5ac57bb3df3 Mon Sep 17 00:00:00 2001
5c6c2a
From: Lukas Nykryn <lnykryn@redhat.com>
5c6c2a
Date: Thu, 26 Oct 2017 13:50:17 +0200
5c6c2a
Subject: [PATCH] rootfs-block/module-setup.sh: check root_dev in
5c6c2a
 cmdline_rootfs()
5c6c2a
5c6c2a
In case of "--no-hostonly-default-device", we do not need
5c6c2a
the root device, thus add this check.
5c6c2a
5c6c2a
Reimplementation of upstream commit 5634a31156070487210a8e362e8f088c5c4dc615
5c6c2a
5c6c2a
Resolves: #1483838
5c6c2a
---
5c6c2a
 modules.d/95rootfs-block/module-setup.sh | 2 +-
5c6c2a
 1 file changed, 1 insertion(+), 1 deletion(-)
5c6c2a
5c6c2a
diff --git a/modules.d/95rootfs-block/module-setup.sh b/modules.d/95rootfs-block/module-setup.sh
5c6c2a
index 5bb704a4..284cb550 100755
5c6c2a
--- a/modules.d/95rootfs-block/module-setup.sh
5c6c2a
+++ b/modules.d/95rootfs-block/module-setup.sh
5c6c2a
@@ -32,7 +32,7 @@ cmdline_journal() {
5c6c2a
 
5c6c2a
 cmdline() {
5c6c2a
     local dev=/dev/block/$(find_root_block_device)
5c6c2a
-    if [ -e $dev ]; then
5c6c2a
+    if [ -e $dev ] && [ -n "$root_dev" ] ; then
5c6c2a
         printf " root=%s" "$(shorten_persistent_dev "$(get_persistent_dev "$dev")")"
5c6c2a
         printf " rootflags=%s" "$(find_mp_fsopts /)"
5c6c2a
         printf " rootfstype=%s" "$(find_mp_fstype /)"