From f6771bd1bf1a5aea9765c70b0b17a826df4b12ba Mon Sep 17 00:00:00 2001 From: "John L. Villalovos" Date: Wed, 14 Sep 2016 16:45:24 -0700 Subject: [PATCH] Fix test syntax error in devstack/lib/ironic The test conditional was not using [[ ]] for the if statement conditional. We can use '&&' inside [[ ]]. So put all the tests inside the one [[ ]] block. Change-Id: I4c8cb7a3a49f5e00ec638bd1fd1d9eb4931b97a1 --- devstack/lib/ironic | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/devstack/lib/ironic b/devstack/lib/ironic index 5c4187c41e..9ea8b96ad2 100644 --- a/devstack/lib/ironic +++ b/devstack/lib/ironic @@ -189,8 +189,9 @@ IRONIC_DIB_RAMDISK_OPTIONS=${IRONIC_DIB_RAMDISK_OPTIONS:-'ubuntu'} # Set this variable to "true" to build an ISO for deploy ramdisk and # upload to Glance. IRONIC_DEPLOY_ISO_REQUIRED=$(trueorfalse False IRONIC_DEPLOY_ISO_REQUIRED) -if $IRONIC_DEPLOY_ISO_REQUIRED = 'True' && $IRONIC_BUILD_DEPLOY_RAMDISK = 'False'\ - && [ -n $IRONIC_DEPLOY_ISO ]; then +if [[ "$IRONIC_DEPLOY_ISO_REQUIRED" = "True" \ + && "$IRONIC_BUILD_DEPLOY_RAMDISK" = "False" \ + && -n "$IRONIC_DEPLOY_ISO" ]]; then die "Prebuilt ISOs are not available, provide an ISO via IRONIC_DEPLOY_ISO \ or set IRONIC_BUILD_DEPLOY_RAMDISK=True to use ISOs" fi