Blame 0039-dracut-lib.sh-getarg-echo-with-to-prevent-wildcard-s.patch

Harald Hoyer 428fde
From d765a3e71b7abfbda7a1f9f65745dde25c8b814c Mon Sep 17 00:00:00 2001
Harald Hoyer 428fde
From: Harald Hoyer <harald@redhat.com>
Harald Hoyer 428fde
Date: Thu, 4 Aug 2011 13:19:00 +0200
Harald Hoyer 428fde
Subject: [PATCH] dracut-lib.sh: getarg() echo with "" to prevent wildcard
Harald Hoyer 428fde
 subst
Harald Hoyer 428fde
Harald Hoyer 428fde
if a value of a key on the kernel command line includes wildcards, these
Harald Hoyer 428fde
would be expanded.
Harald Hoyer 428fde
E.g., if you have "key=/dev/sd*" the value would be substituted with
Harald Hoyer 428fde
"/dev/sda /dev/sda1 /dev/sda2" instead of returning "/dev/sd*"
Harald Hoyer 428fde
---
Harald Hoyer 428fde
 modules.d/99base/dracut-lib.sh |    4 ++--
Harald Hoyer 428fde
 1 files changed, 2 insertions(+), 2 deletions(-)
Harald Hoyer 428fde
Harald Hoyer 428fde
diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh
Harald Hoyer 428fde
index f65e853..80c1f84 100755
Harald Hoyer 428fde
--- a/modules.d/99base/dracut-lib.sh
Harald Hoyer 428fde
+++ b/modules.d/99base/dracut-lib.sh
Harald Hoyer 428fde
@@ -74,7 +74,7 @@ _dogetarg() {
Harald Hoyer 428fde
         fi
Harald Hoyer 428fde
     done
Harald Hoyer 428fde
     if [ -n "$_val" ]; then
Harald Hoyer 428fde
-        [ "x$_doecho" != "x" ] && echo $_val;
Harald Hoyer 428fde
+        [ "x$_doecho" != "x" ] && echo "$_val";
Harald Hoyer 428fde
         return 0;
Harald Hoyer 428fde
     fi
Harald Hoyer 428fde
     return 1;
Harald Hoyer 428fde
@@ -150,7 +150,7 @@ getargs() {
Harald Hoyer 428fde
         shift
Harald Hoyer 428fde
     done
Harald Hoyer 428fde
     if [ -n "$_val" ]; then
Harald Hoyer 428fde
-        echo -n $_val
Harald Hoyer 428fde
+        echo -n "$_val"
Harald Hoyer 428fde
         [ "$RD_DEBUG" = "yes" ] && set -x
Harald Hoyer 428fde
         return 0
Harald Hoyer 428fde
     fi