public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Alexander Smirnov <asmirnov@ilbers.de>
To: isar-users@googlegroups.com
Cc: Alexander Smirnov <asmirnov@ilbers.de>
Subject: [PATCH 1/2] start_vm: Fix quotes usage
Date: Fri, 27 Apr 2018 13:28:52 +0300	[thread overview]
Message-ID: <20180427102853.5454-2-asmirnov@ilbers.de> (raw)
In-Reply-To: <20180427102853.5454-1-asmirnov@ilbers.de>

According to the following chapter:

http://wiki.bash-hackers.org/syntax/quoting#quotes_and_escaping

  MYARG="\"my multiword argument\""
  somecommand $MYARG

is NOT the same as:

  command "my multiword argument"

So this patch splits kernel params to separate variable for correct
interpretation.

Tested with bash and dash in Debian jessie.

Signed-off-by: Alexander Smirnov <asmirnov@ilbers.de>
---
 scripts/start_vm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/scripts/start_vm b/scripts/start_vm
index cfb2bea..7eb633e 100755
--- a/scripts/start_vm
+++ b/scripts/start_vm
@@ -28,6 +28,7 @@ start_qemu() {
 	$QCPU \
 	-nographic \
 	$EXTRA_ARGS \
+        "$KARGS" \
 	$root
     [ $had_x -eq 0 ] && set +x
 }
@@ -123,7 +124,8 @@ case "$IMAGE_TYPE" in
     EXTRA_ARGS="$EXTRA_ARGS \
 	-kernel $QKERNEL \
 	-initrd $QINITRD \
-	-append \"console=$MACHINE_SERIAL root=/dev/$ROOTFS_DEV rw\""
+	-append "
+    KARGS="console=$MACHINE_SERIAL root=/dev/$ROOTFS_DEV rw"
     ;;
     wic-img)
     readonly ROOTFS_IMAGE=isar-image-base-debian-$DISTRO-qemu$ARCH.wic.img
-- 
2.9.5


  reply	other threads:[~2018-04-27 10:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-27 10:28 [PATCH 0/2] Fix start_vm script Alexander Smirnov
2018-04-27 10:28 ` Alexander Smirnov [this message]
2018-04-27 11:06   ` [PATCH 1/2] start_vm: Fix quotes usage Henning Schild
2018-04-27 11:14     ` Alexander Smirnov
2018-04-27 14:37   ` [PATCH v2 " Alexander Smirnov
2018-04-27 10:28 ` [PATCH 2/2] start_vm: Fix script header Alexander Smirnov
2018-05-01 19:23 ` [PATCH 0/2] Fix start_vm script Alexander Smirnov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180427102853.5454-2-asmirnov@ilbers.de \
    --to=asmirnov@ilbers.de \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox