diff --git a/src/datastore_mad/remotes/vmfs/clone b/src/datastore_mad/remotes/vmfs/clone index d69a588e4e..bfc6418a94 100755 --- a/src/datastore_mad/remotes/vmfs/clone +++ b/src/datastore_mad/remotes/vmfs/clone @@ -79,7 +79,7 @@ vmfs_set_up log "Copying local image $SRC to the image repository" -if [ "$USE_SSH" == "yes" ]; then +if [ "${USE_SSH,,}" == "yes" ]; then if ! is_cdrom; then ssh_make_path $DST_HOST /vmfs/volumes/$DS_ID/$DST_FOLDER ssh_exec_and_log $DST_HOST \ diff --git a/src/datastore_mad/remotes/vmfs/cp b/src/datastore_mad/remotes/vmfs/cp index 212e5ffd99..a6c512f1c4 100755 --- a/src/datastore_mad/remotes/vmfs/cp +++ b/src/datastore_mad/remotes/vmfs/cp @@ -145,12 +145,12 @@ if [ -d "$SRC" -a ! -f "$SRC/disk.vmdk" ]; then fi # Make the final hop, front-end -> VMFS Datastore -if [ "$USE_SSH" == "yes" ]; then +if [ "${USE_SSH,,}" == "yes" ]; then if ! is_cdrom; then exec_and_log "$SCP -r $SRC/* $DST_HOST:$DST" \ "Error copying $SRC to $DST through SCP" else - exec_and_log "$SCP $SRC $DST_HOST:$DST" \ + exec_and_log "$SCP $SRC $DST_HOST:$DST" \ "Error copying $SRC to $DST through SCP" fi else diff --git a/src/datastore_mad/remotes/vmfs/mkfs b/src/datastore_mad/remotes/vmfs/mkfs index 355284cce1..12354e004a 100755 --- a/src/datastore_mad/remotes/vmfs/mkfs +++ b/src/datastore_mad/remotes/vmfs/mkfs @@ -99,7 +99,7 @@ if [ $? -eq 1 ] ; then VMWARE_DISK_TYPE="thin" fi -if [ "$USE_SSH" == "yes" ]; then +if [ "${USE_SSH,,}" == "yes" ]; then $SSH $DST_HOST $VMKFSTOOLS -U [$DS_ID]$DST_FOLDER/disk.vmdk &> /dev/null ssh_exec_and_log $DST_HOST \ "$VMKFSTOOLS -c ${SIZE}M -d ${VMWARE_DISK_TYPE} $DST/disk.vmdk" \ diff --git a/src/datastore_mad/remotes/vmfs/rm b/src/datastore_mad/remotes/vmfs/rm index a7be030173..0398124276 100755 --- a/src/datastore_mad/remotes/vmfs/rm +++ b/src/datastore_mad/remotes/vmfs/rm @@ -70,7 +70,7 @@ vmfs_set_up log "Removing $SRC from the image repository" -if [ "$USE_SSH" == "yes" ]; then +if [ "${USE_SSH,,}" == "yes" ]; then if [ -n $DS_ID -a -n $SRC_FOLDER ]; then ssh_exec_and_log $DST_HOST "rm -rf $SRC" "Error deleting $SRC" fi diff --git a/src/mad/sh/scripts_common.sh b/src/mad/sh/scripts_common.sh index c269f94de5..c0dd9ccf2d 100644 --- a/src/mad/sh/scripts_common.sh +++ b/src/mad/sh/scripts_common.sh @@ -466,7 +466,7 @@ function iqn_get_host { function vmfs_create_remote_path { DS_ID=$1 # Create DST in DST_HOST - if [ "$USE_SSH" == "yes" ]; then + if [ "${USE_SSH,,}" == "yes" ]; then exec_and_log "ssh_make_path $DST_HOST /vmfs/volumes/$DS_ID/$DST_FOLDER" \ "Cannot create /vmfs/volumes/$DS_ID/$DST_FOLDER in $DST_HOST" else @@ -476,7 +476,7 @@ function vmfs_create_remote_path { } function vmfs_set_up { - if [ "$USE_SSH" != "yes" ]; then + if [ "${USE_SSH,,}" != "yes" ]; then USERNAME=`echo $(cat $VMWARERC |grep ":username:"|cut -d":" -f 3|tr -d '"')` PASSWORD=`echo $(cat $VMWARERC |grep ":password:"|cut -d":" -f 3|tr -d '"')` if [ -z $PASSWORD ]; then diff --git a/src/tm_mad/tm_common.sh b/src/tm_mad/tm_common.sh index 0fd3e00948..30395b0b56 100644 --- a/src/tm_mad/tm_common.sh +++ b/src/tm_mad/tm_common.sh @@ -96,7 +96,7 @@ function get_tm_use_ssh { TM_USE_SSH="${XPATH_ELEMENTS[0]:-$TM_USE_SSH}" - echo $TM_USE_SSH + echo ${TM_USE_SSH,,} } #Return DISK_TYPE