ubuntu-server-cloudimg-modify.sh: shellcheck fixes 25/31325/1
authorRoss Brattain <ross.b.brattain@intel.com>
Thu, 9 Mar 2017 08:53:12 +0000 (00:53 -0800)
committerJing Lu <lvjing5@huawei.com>
Wed, 22 Mar 2017 08:12:10 +0000 (08:12 +0000)
fixes for shellcheck warning

ubuntu-server-cloudimg-modify.sh:51:23: warning: Quote this to prevent word splitting. [SC2046]
ubuntu-server-cloudimg-modify.sh:51:30: note: Double quote to prevent globbing and word splitting. [SC2086]

Change-Id: I6cff0713a0471e5ce94211d42a7c8b45e3761c4d
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
(cherry picked from commit 8a2b7cdb29ff6a56d06e8f83fc098def40e1ed51)

tools/ubuntu-server-cloudimg-modify.sh

index 0316ece..3c0e3be 100755 (executable)
@@ -48,7 +48,7 @@ EOF
 apt-get update
 if [[ "${YARD_IMG_ARCH}" = "arm64" && "$release" = "vivid" ]]; then
     apt-get install -y \
-        linux-headers-$(echo $CLOUD_KERNEL_VERSION | cut -d'-' -f3,4,5) \
+        linux-headers-"$(echo ${CLOUD_KERNEL_VERSION} | cut -d'-' -f3,4,5)" \
         unzip
     #resize root partition (/dev/vdb1) It is supposed to be default but the image is booted differently for arm64
 cat <<EOF >/etc/cloud/cloud.cfg.d/15_growpart.cfg