From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6549073309689970688 X-Received: by 2002:adf:ab57:: with SMTP id r23-v6mr131085wrc.13.1524827672411; Fri, 27 Apr 2018 04:14:32 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:adf:ea87:: with SMTP id s7-v6ls371128wrm.14.gmail; Fri, 27 Apr 2018 04:14:32 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqYRGwSLMVB3MjeVqG1EuKKec2KgZeA0vgPei0pT+fBcSLwDDQ6poIbWIW+TD20l+HAPfNj X-Received: by 2002:adf:e28d:: with SMTP id v13-v6mr129691wri.3.1524827671999; Fri, 27 Apr 2018 04:14:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524827671; cv=none; d=google.com; s=arc-20160816; b=D/EqiDH33at8NeX/Z8GzFQ24Zbb3dgHZwfWLshqwqENtBhSrJuxQMWPUCw8b8reoAf 4GVg7tUDEuD9Le1WqBC2sdiLA+cjUUwDFZr+vkryBHHCBsr7tgKCFVFQnSMs1IRgPWYS p9v2NjrqAV5XLB/+cWXJdf0+t+DH+iYN8anjLvk9RHVcEUPhcvj/LEhDYKRy0xPUVyBk 5sbM/no4FioYiaqRkwbMl9mVcEpNN/DwTNDwtLDdoKXt+jfhCfiPchqtSNZNEldHSbhK gEgZhCkpX9g8kOQ/MHMypoRqMYsenvsupXhK+BT9zj1Gg2YFopfrk6nm3u4GXOg9zR2w griQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:cc:to:subject :arc-authentication-results; bh=DkLzeg2Gq8cKm4MdPzwzqIeWBj2zZ2xFW0yY5oUXXtE=; b=Jb4pRSGO1eQ6+d6JWpTosZgVcRL5uOSdkQiO3hHEdS3NPg+K2NCtDp674u2qJCsOD8 iaTogVYURFPHYlqiRzWQd4Im2cohjWkCX24/hvKOcfZAWBTsTTKWb0sSyA53nCjdimvN whmXwwCL1EhpdyXRe+xCJ2NcO2QMbnPMbWZh5d5WlBC++yFfqvoV9X5aav9hwa73xdQi 6d8Swd6imec+kBz0/XYJBWhkUcYuDmKo480nNIunHQPZeb5S7KGaUu/3M98KVFj0mq1A O9L2H//FXIEEGzzKxLId8+agp644j+TV1/VTjHauNvT+YSpfMgAuU8j/LnDX0Wo1/GhY uCww== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=asmirnov@ilbers.de Return-Path: Received: from aqmola.ilbers.de (aqmola.ilbers.de. [85.214.62.211]) by gmr-mx.google.com with ESMTPS id u1-v6si38052wri.3.2018.04.27.04.14.31 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Apr 2018 04:14:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) client-ip=85.214.62.211; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=asmirnov@ilbers.de Received: from [10.0.2.15] ([188.227.110.165]) (authenticated bits=0) by aqmola.ilbers.de (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP id w3RBESbB031153 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Fri, 27 Apr 2018 13:14:30 +0200 Subject: Re: [PATCH 1/2] start_vm: Fix quotes usage To: Henning Schild Cc: isar-users@googlegroups.com References: <20180427102853.5454-1-asmirnov@ilbers.de> <20180427102853.5454-2-asmirnov@ilbers.de> <20180427130649.5ce34aa1@md1pvb1c.ad001.siemens.net> From: Alexander Smirnov Message-ID: Date: Fri, 27 Apr 2018 14:14:23 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20180427130649.5ce34aa1@md1pvb1c.ad001.siemens.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: 50TXt/DWX4Br On 04/27/2018 02:06 PM, Henning Schild wrote: > Am Fri, 27 Apr 2018 13:28:52 +0300 > schrieb 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 >> --- >> 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