Browse code

Fix upload_image error in stackrc

This commit fixes error caused by adding default image path to IMAGE_URLS without ','
If user sets IMAGE_URLS in localrc like
IMAGE_URLS="path1, path2" (with a space after the comma)
the we get an error "binary operator expected" in
if [ -n $IMAGE_URLS ] condition and a comma will not be added to the end of IMAGE_URLS
In the code below we add default image path(path3) to IMAGE_URLS and we get
IMAGE_URLS="path1, path2path3"

Change-Id: I6543f7178c49a42c71ad9df4cdb4c6e78cbf7758

Mikhail Feoktistov authored on 2015/09/04 00:15:28
Showing 1 changed files
... ...
@@ -565,7 +565,7 @@ CIRROS_ARCH=${CIRROS_ARCH:-"x86_64"}
565 565
 # ``IMAGE_URLS`` to be set in the `localrc` section of ``local.conf``.
566 566
 DOWNLOAD_DEFAULT_IMAGES=$(trueorfalse True DOWNLOAD_DEFAULT_IMAGES)
567 567
 if [[ "$DOWNLOAD_DEFAULT_IMAGES" == "True" ]]; then
568
-    if [ -n $IMAGE_URLS ]; then
568
+    if [[ -n "$IMAGE_URLS" ]]; then
569 569
         IMAGE_URLS+=","
570 570
     fi
571 571
     case "$VIRT_DRIVER" in