All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] initramfs-framework/setup-live: quote bootparam_root variable
@ 2017-08-23 22:47 California Sullivan
  0 siblings, 0 replies; only message in thread
From: California Sullivan @ 2017-08-23 22:47 UTC (permalink / raw)
  To: openembedded-core

When bootparam_root was empty the if statement would resolve into
invalid syntax instead of short circuiting after the -z, causing a boot
failure.

Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
---
I stupidly didn't test an empty root parameter with my previous patch
and just assumed the -z $bootparam_root would still work. I was wrong.

Rest assured this patch was tested with all three cases: an empty root
parameter, root=/dev/ram0, and a valid PARTUUID.

 meta/recipes-core/initrdscripts/initramfs-framework/setup-live | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/setup-live b/meta/recipes-core/initrdscripts/initramfs-framework/setup-live
index b98a321..4c79f41 100644
--- a/meta/recipes-core/initrdscripts/initramfs-framework/setup-live
+++ b/meta/recipes-core/initrdscripts/initramfs-framework/setup-live
@@ -12,7 +12,7 @@ ISOLINUX=""
 ROOT_DISK=""
 shelltimeout=30
 
-	if [ -z $bootparam_root -o $bootparam_root = "/dev/ram0" ]; then
+	if [ -z "$bootparam_root" -o "$bootparam_root" = "/dev/ram0" ]; then
 		echo "Waiting for removable media..."
 		C=0
 		while true
-- 
2.9.5



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-08-23 22:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-23 22:47 [PATCH] initramfs-framework/setup-live: quote bootparam_root variable California Sullivan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.