dracut-lib.sh: getarg() echo with "" to prevent wildcard subst
authorHarald Hoyer <harald@redhat.com>
Thu, 4 Aug 2011 11:19:00 +0000 (13:19 +0200)
committerHarald Hoyer <harald@redhat.com>
Wed, 10 Aug 2011 16:43:54 +0000 (18:43 +0200)
if a value of a key on the kernel command line includes wildcards, these
would be expanded.
E.g., if you have "key=/dev/sd*" the value would be substituted with
"/dev/sda /dev/sda1 /dev/sda2" instead of returning "/dev/sd*"

modules.d/99base/dracut-lib.sh

index f65e853c342dc9618155709bbe45363e5239451b..80c1f8476febb0fa5ded857323a53082acc9c578 100755 (executable)
@@ -74,7 +74,7 @@ _dogetarg() {
         fi
     done
     if [ -n "$_val" ]; then
-        [ "x$_doecho" != "x" ] && echo $_val;
+        [ "x$_doecho" != "x" ] && echo "$_val";
         return 0;
     fi
     return 1;
@@ -150,7 +150,7 @@ getargs() {
         shift
     done
     if [ -n "$_val" ]; then
-        echo -n $_val
+        echo -n "$_val"
         [ "$RD_DEBUG" = "yes" ] && set -x
         return 0
     fi