ref: 79a7e41bb7b15906f2d205756e4c647175bf7dbe
parent: 267f158c87b7c8dc16bcb26e85378764ec2a826e
author: Shiz <hi@shiz.me>
date: Wed Nov 16 20:52:51 CST 2016
init: fix quoting issue for kernel arguments The kernel passes arguments from /proc/cmdline as a single string like foo=bar baz="something with spaces". In the latter case, with the added single quotes the actual value of ${KOPT_baz} would contain these quotes as well, which is not the intention.
--- a/initramfs-init.in
+++ b/initramfs-init.in
@@ -279,7 +279,7 @@
for i in $myopts; do
case "$opt" in
- $i=*) eval "KOPT_${i}='${opt#*=}'";;
+ $i=*) eval "KOPT_${i}=${opt#*=}";;
$i) eval "KOPT_${i}=yes";;
no$i) eval "KOPT_${i}=no";;
esac