Blame 0081-dracut-lib.sh-fix-dropped-backslashes-in-CMDLINE.patch

Harald Hoyer 55891e
From 2cd4a8065ac2bb6bf3708d681de56bbe1984c3ce Mon Sep 17 00:00:00 2001
Harald Hoyer 55891e
From: Will Woods <wwoods@redhat.com>
Harald Hoyer 55891e
Date: Wed, 12 Oct 2011 22:48:08 -0400
Harald Hoyer 55891e
Subject: [PATCH] dracut-lib.sh: fix dropped backslashes in CMDLINE
Harald Hoyer 55891e
Harald Hoyer 55891e
The "read" shell builtin consumes backslashes, which is a problem if
Harald Hoyer 55891e
your root device is something like "LABEL=Fedora\x2016".
Harald Hoyer 55891e
Harald Hoyer 55891e
Using "read -r" tells the shell to leave backslashes alone.
Harald Hoyer 55891e
---
Harald Hoyer 55891e
 modules.d/99base/dracut-lib.sh |    4 ++--
Harald Hoyer 55891e
 1 files changed, 2 insertions(+), 2 deletions(-)
Harald Hoyer 55891e
Harald Hoyer 55891e
diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh
Harald Hoyer 55891e
index 62c3bf5..bc4d7c9 100755
Harald Hoyer 55891e
--- a/modules.d/99base/dracut-lib.sh
Harald Hoyer 55891e
+++ b/modules.d/99base/dracut-lib.sh
Harald Hoyer 55891e
@@ -35,11 +35,11 @@ _getcmdline() {
Harald Hoyer 55891e
     unset _line
Harald Hoyer 55891e
     if [ -z "$CMDLINE" ]; then
Harald Hoyer 55891e
         if [ -e /etc/cmdline ]; then
Harald Hoyer 55891e
-            while read _line; do
Harald Hoyer 55891e
+            while read -r _line; do
Harald Hoyer 55891e
                 CMDLINE_ETC="$CMDLINE_ETC $_line";
Harald Hoyer 55891e
             done 
Harald Hoyer 55891e
         fi
Harald Hoyer 55891e
-        read CMDLINE 
Harald Hoyer 55891e
+        read -r CMDLINE 
Harald Hoyer 55891e
         CMDLINE="$CMDLINE $CMDLINE_ETC"
Harald Hoyer 55891e
     fi
Harald Hoyer 55891e
 }