mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-12 08:58:17 +03:00
feature #2097: Make DS/TM_USE_SSH not case-sensitive
(cherry picked from commit b11966dc155c7504fd4c34fc2282c3f9c4e8117d)
This commit is contained in:
parent
8a6a6e9917
commit
270c148444
@ -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 \
|
||||
|
@ -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
|
||||
|
@ -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" \
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user