Blame SOURCES/0452-systemd-dracut-cmdline.sh-unset-UNSET-root.patch

a0a3b4
From fc77aca7ddbd33328066a943a4de09de34d25c4c Mon Sep 17 00:00:00 2001
a0a3b4
From: Harald Hoyer <harald@redhat.com>
a0a3b4
Date: Fri, 12 Aug 2016 11:24:47 +0200
a0a3b4
Subject: [PATCH] systemd/dracut-cmdline.sh: unset "UNSET" $root
a0a3b4
a0a3b4
https://bugzilla.redhat.com/show_bug.cgi?id=1365667
a0a3b4
caused by commit 9aa224cc
a0a3b4
---
a0a3b4
 modules.d/98systemd/dracut-cmdline.sh | 6 +++---
a0a3b4
 1 file changed, 3 insertions(+), 3 deletions(-)
a0a3b4
a0a3b4
diff --git a/modules.d/98systemd/dracut-cmdline.sh b/modules.d/98systemd/dracut-cmdline.sh
1755ca
index d22e4d6e..17b30a34 100755
a0a3b4
--- a/modules.d/98systemd/dracut-cmdline.sh
a0a3b4
+++ b/modules.d/98systemd/dracut-cmdline.sh
a0a3b4
@@ -26,7 +26,7 @@ source_conf /etc/conf.d
a0a3b4
 # between the case where it was set to the empty string and the case where it
a0a3b4
 # wasn't specified at all.
a0a3b4
 if ! root="$(getarg root=)"; then
a0a3b4
-    root='UNSET'
a0a3b4
+    root_unset='UNSET'
a0a3b4
 fi
a0a3b4
 
a0a3b4
 rflags="$(getarg rootflags=)"
a0a3b4
@@ -50,7 +50,7 @@ source_hook cmdline
a0a3b4
 
a0a3b4
 [ -f /lib/dracut/parse-resume.sh ] && . /lib/dracut/parse-resume.sh
a0a3b4
 
a0a3b4
-case "$root" in
a0a3b4
+case "${root}${root_unset}" in
a0a3b4
     block:LABEL=*|LABEL=*)
a0a3b4
         root="${root#block:}"
a0a3b4
         root="$(echo $root | sed 's,/,\\x2f,g')"
a0a3b4
@@ -76,7 +76,7 @@ case "$root" in
a0a3b4
         rootok=1 ;;
a0a3b4
 esac
a0a3b4
 
a0a3b4
-[ -z "$root" ] && die "Empty root= argument"
a0a3b4
+[ -z "${root}${root_unset}" ] && die "Empty root= argument"
a0a3b4
 [ -z "$rootok" ] && die "Don't know how to handle 'root=$root'"
a0a3b4
 
a0a3b4
 export root rflags fstype netroot NEWROOT