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

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