* [PATCH 0/2] Fix start_vm script
@ 2018-04-27 10:28 Alexander Smirnov
2018-04-27 10:28 ` [PATCH 1/2] start_vm: Fix quotes usage Alexander Smirnov
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Alexander Smirnov @ 2018-04-27 10:28 UTC (permalink / raw)
To: isar-users; +Cc: Alexander Smirnov
Hi all,
eventually we've found two issues with start_vm script. Now it works
good after wic series applying on my Debian jessie machine.
@Henning: is it OK to apply this patches on top of your series, or it'd
be better to update respective patch in your series with this changes?
Alex
Alexander Smirnov (2):
start_vm: Fix quotes usage
start_vm: Fix script header
scripts/start_vm | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--
2.9.5
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/2] start_vm: Fix quotes usage
2018-04-27 10:28 [PATCH 0/2] Fix start_vm script Alexander Smirnov
@ 2018-04-27 10:28 ` Alexander Smirnov
2018-04-27 11:06 ` Henning Schild
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
2 siblings, 2 replies; 7+ messages in thread
From: Alexander Smirnov @ 2018-04-27 10:28 UTC (permalink / raw)
To: isar-users; +Cc: Alexander Smirnov
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/2] start_vm: Fix script header
2018-04-27 10:28 [PATCH 0/2] Fix start_vm script Alexander Smirnov
2018-04-27 10:28 ` [PATCH 1/2] start_vm: Fix quotes usage Alexander Smirnov
@ 2018-04-27 10:28 ` Alexander Smirnov
2018-05-01 19:23 ` [PATCH 0/2] Fix start_vm script Alexander Smirnov
2 siblings, 0 replies; 7+ messages in thread
From: Alexander Smirnov @ 2018-04-27 10:28 UTC (permalink / raw)
To: isar-users; +Cc: Alexander Smirnov
Current header contains incorrect shell interpreter definition.
Reported-by: Baurzhan Ismagulov <ibr@ilbers.de>
Signed-off-by: Alexander Smirnov <asmirnov@ilbers.de>
---
scripts/start_vm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/start_vm b/scripts/start_vm
index 7eb633e..b19a9ca 100755
--- a/scripts/start_vm
+++ b/scripts/start_vm
@@ -1,4 +1,4 @@
-#/bin/sh
+#!/bin/sh
#
# This software is a part of ISAR.
# Copyright (C) 2015-2017 ilbers GmbH
--
2.9.5
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] start_vm: Fix quotes usage
2018-04-27 10:28 ` [PATCH 1/2] start_vm: Fix quotes usage Alexander Smirnov
@ 2018-04-27 11:06 ` Henning Schild
2018-04-27 11:14 ` Alexander Smirnov
2018-04-27 14:37 ` [PATCH v2 " Alexander Smirnov
1 sibling, 1 reply; 7+ messages in thread
From: Henning Schild @ 2018-04-27 11:06 UTC (permalink / raw)
To: Alexander Smirnov; +Cc: isar-users
Am Fri, 27 Apr 2018 13:28:52 +0300
schrieb Alexander Smirnov <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" \
How about?
-append "$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 "
Where are the closing quotes?
Henning
> + KARGS="console=$MACHINE_SERIAL root=/dev/$ROOTFS_DEV rw"
> ;;
> wic-img)
> readonly
> ROOTFS_IMAGE=isar-image-base-debian-$DISTRO-qemu$ARCH.wic.img
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] start_vm: Fix quotes usage
2018-04-27 11:06 ` Henning Schild
@ 2018-04-27 11:14 ` Alexander Smirnov
0 siblings, 0 replies; 7+ messages in thread
From: Alexander Smirnov @ 2018-04-27 11:14 UTC (permalink / raw)
To: Henning Schild; +Cc: isar-users
On 04/27/2018 02:06 PM, Henning Schild wrote:
> Am Fri, 27 Apr 2018 13:28:52 +0300
> schrieb Alexander Smirnov <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" \
>
> How about?
> -append "$KARGS"
If I understand this correctly, $KARGS could be empty for some cases.
Does it work with empty $KARGS? Let me check this. But in general I like
your suggestion.
>
>> $root
>> [ $had_x -eq 0 ] && set +x
>> }
>> @@ -123,7 +124,8 @@ case "$IMAGE_TYPE" in
>> EXTRA_ARGS="$EXTRA_ARGS \
^
Here is opening one.
>> -kernel $QKERNEL \
>> -initrd $QINITRD \
>> - -append \"console=$MACHINE_SERIAL root=/dev/$ROOTFS_DEV rw\""
>> + -append "
^
This one is closing.
>
> Where are the closing quotes?
Alex
>
> Henning
>
>> + KARGS="console=$MACHINE_SERIAL root=/dev/$ROOTFS_DEV rw"
>> ;;
>> wic-img)
>> readonly
>> ROOTFS_IMAGE=isar-image-base-debian-$DISTRO-qemu$ARCH.wic.img
>
--
With best regards,
Alexander Smirnov
ilbers GmbH
Baierbrunner Str. 28c
D-81379 Munich
+49 (89) 122 67 24-0
http://ilbers.de/
Commercial register Munich, HRB 214197
General manager: Baurzhan Ismagulov
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 1/2] start_vm: Fix quotes usage
2018-04-27 10:28 ` [PATCH 1/2] start_vm: Fix quotes usage Alexander Smirnov
2018-04-27 11:06 ` Henning Schild
@ 2018-04-27 14:37 ` Alexander Smirnov
1 sibling, 0 replies; 7+ messages in thread
From: Alexander Smirnov @ 2018-04-27 14:37 UTC (permalink / raw)
To: isar-users; +Cc: Alexander Smirnov
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 | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/scripts/start_vm b/scripts/start_vm
index cfb2bea..19b6b20 100755
--- a/scripts/start_vm
+++ b/scripts/start_vm
@@ -28,6 +28,7 @@ start_qemu() {
$QCPU \
-nographic \
$EXTRA_ARGS \
+ -append "$KARGS" \
$root
[ $had_x -eq 0 ] && set +x
}
@@ -122,8 +123,8 @@ case "$IMAGE_TYPE" in
[ -n "$INITRD_IMAGE" ] && QINITRD=$IMAGE_DIR/${INITRD_IMAGE}
EXTRA_ARGS="$EXTRA_ARGS \
-kernel $QKERNEL \
- -initrd $QINITRD \
- -append \"console=$MACHINE_SERIAL root=/dev/$ROOTFS_DEV rw\""
+ -initrd $QINITRD"
+ 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] Fix start_vm script
2018-04-27 10:28 [PATCH 0/2] Fix start_vm script Alexander Smirnov
2018-04-27 10:28 ` [PATCH 1/2] start_vm: Fix quotes usage Alexander Smirnov
2018-04-27 10:28 ` [PATCH 2/2] start_vm: Fix script header Alexander Smirnov
@ 2018-05-01 19:23 ` Alexander Smirnov
2 siblings, 0 replies; 7+ messages in thread
From: Alexander Smirnov @ 2018-05-01 19:23 UTC (permalink / raw)
To: isar-users
> eventually we've found two issues with start_vm script. Now it works
> good after wic series applying on my Debian jessie machine.
>
> @Henning: is it OK to apply this patches on top of your series, or it'd
> be better to update respective patch in your series with this changes?
>
Applied to next.
Alex
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-05-01 19:23 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-27 10:28 [PATCH 0/2] Fix start_vm script Alexander Smirnov
2018-04-27 10:28 ` [PATCH 1/2] start_vm: Fix quotes usage Alexander Smirnov
2018-04-27 11:06 ` 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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox