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