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

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