1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

feature #1437: Fixing quotes problem in VMFS drivers

This commit is contained in:
Tino Vazquez 2012-09-12 18:20:36 +02:00
parent 7392786781
commit b15513d495
8 changed files with 15 additions and 15 deletions

View File

@ -151,7 +151,7 @@ function get_destination_host {
sed -i -e "1d" $CONF_FILE_PATH
cat $BRIDGE_HOST >> $CONF_FILE_PATH
echo $BRIDGE_HOST >> $CONF_FILE_PATH
echo $BRIDGE_HOST
}

View File

@ -78,7 +78,7 @@ log "Copying local image $SRC to the image repository"
if [ "$SSH" == "yes" ]; then
ssh_exec_and_log "$VMKFSTOOLS $VI_PARAMS $SRC $DST" "Error copying $SRC to $DST"
else
exec_and_log 'vifs $VI_PARAMS --copy "[$DS_ID] $SRC_FOLDER" "[$DS_ID] $DST_FOLDER"' "Error copying $SRC to $DST"
exec_and_log "vifs $VI_PARAMS --copy \"[$DS_ID] $SRC_FOLDER\" \"[$DS_ID] $DST_FOLDER\"" "Error copying $SRC to $DST"
fi
echo "$DST"

View File

@ -82,7 +82,7 @@ fi
if [ "$SSH" == "yes" ]; then
ssh_make_path $DST_HOST $DST
else
exec_and_log 'vifs $VI_PARAMS --mkdir "$DST"' "Cannot create $DST in $DST_HOST"
exec_and_log "vifs $VI_PARAMS --mkdir $DST" "Cannot create $DST in $DST_HOST"
fi
# Prepare for a possible download in the front-end
@ -143,7 +143,7 @@ else
cd $SRC
for file in $(find . -type f); do
FNAME=$(basename $file)
exec_and_log 'vifs $VI_PARAMS -p $file $DST/$FNAME' "Cannot upload $file to $DST/$FNAME on $DST_HOST"
exec_and_log "vifs $VI_PARAMS -p $file $DST/$FNAME" "Cannot upload $file to $DST/$FNAME on $DST_HOST"
done
fi

View File

@ -75,9 +75,9 @@ else
# We have to erase the contents of the folder one by one
FILES_TO_ERASE=`vifs $VI_PARAMS --dir "[$DS_NAME] $FOLDER_TO_ERASE"|grep -v "Content Listing"|grep -v "\-\-\-\-\-\-\-\-"|egrep -v "^[[:space:]]*$"`
for file in $FILES_TO_ERASE; do
exec_and_log 'vifs $VI_PARAMS --rm "[$DS_NAME] $FOLDER_TO_ERASE/$file"' "Cannot delete $FOLDER_TO_ERASE/$file in $DST_HOST"
exec_and_log "vifs $VI_PARAMS --rm \"[$DS_NAME] $FOLDER_TO_ERASE/$file\"" "Cannot delete $FOLDER_TO_ERASE/$file in $DST_HOST"
done
exec_and_log 'vifs $VI_PARAMS --rm "[$DS_NAME] $FOLDER_TO_ERASE"' "Cannot delete $FOLDER_TO_ERASE in $DST_HOST"
exec_and_log "vifs $VI_PARAMS --rm \"[$DS_NAME] $FOLDER_TO_ERASE\"" "Cannot delete $FOLDER_TO_ERASE in $DST_HOST"
fi
exit 0

View File

@ -65,8 +65,8 @@ if [ "$SSH" == "yes" ]; then
ssh_make_path $DST_HOST $DST_PATH
else
# Two calls needed since vifs cannot do a mkdir -p
exec_and_log 'vifs $VI_PARAMS --mkdir "[$SYSTEM_DS_NAME] $VMID"' "Cannot create [$SYSTEM_DS_NAME] $VMID in $DST_HOST"
exec_and_log 'vifs $VI_PARAMS --mkdir "$DST_DIR_WITHOUT_DS_PATH"' "Cannot create $DST_DIR_WITHOUT_DS_PATH in $DST_HOST"
exec_and_log "vifs $VI_PARAMS --mkdir \"[$SYSTEM_DS_NAME] $VMID\"" "Cannot create [$SYSTEM_DS_NAME] $VMID in $DST_HOST"
exec_and_log "vifs $VI_PARAMS --mkdir \"$DST_DIR_WITHOUT_DS_PATH\"" "Cannot create $DST_DIR_WITHOUT_DS_PATH in $DST_HOST"
fi
#-------------------------------------------------------------------------------
@ -91,7 +91,7 @@ EOF
)
ssh_exec_and_log $DST_HOST "$CLONESCRIPT" "Error cloning $SRC to $DST"
else
exec_and_log '$VMKFSTOOLS $VI_PARAMS -i "$SRC_DIR_WITHOUT_DS_PATH/disk.vmdk" -d thin "$DST_DIR_WITHOUT_DS_PATH/disk.vmdk"' "Error cloning $SRC to $DST"
exec_and_log "$VMKFSTOOLS $VI_PARAMS -i \"$SRC_DIR_WITHOUT_DS_PATH/disk.vmdk\" -d thin \"$DST_DIR_WITHOUT_DS_PATH/disk.vmdk\"" "Error cloning $SRC to $DST"
fi
exit 0

View File

@ -58,7 +58,7 @@ fi
if [ "$SSH" == "yes" ]; then
ssh_make_path $DST_HOST $DST_DIR
else
exec_and_log 'vifs $VI_PARAMS --mkdir "$DST_DIR"' "Cannot create $DST_DIR on %DST_HOST"
exec_and_log "vifs $VI_PARAMS --mkdir \"$DST_DIR\"" "Cannot create $DST_DIR on %DST_HOST"
fi
#-------------------------------------------------------------------------------
@ -89,7 +89,7 @@ if [ "$SSH" == "yes" ]; then
exec_and_log "$SCP $ISO_FILE $DST" "Error copying context ISO to $DST"
else
# Copies the iso file with .iso suffix, needed for VMware CDROMs
exec_and_log 'vifs $VI_PARAMS -p $ISO_FILE $DST_PATH.iso' "Error copying context ISO to $DST"
exec_and_log "vifs $VI_PARAMS -p $ISO_FILE $DST_PATH.iso" "Error copying context ISO to $DST"
fi
rm -rf $ISO_DIR > /dev/null 2>&1

View File

@ -57,7 +57,7 @@ if [ "$SSH" == "yes" ]; then
else
USERNAME=`echo $(cat $VMWARERC |grep ":username:"|cut -d":" -f 3)`
PASSWORD=`echo $(cat $VMWARERC |grep ":password:"|cut -d":" -f 3)`
exec_and_log '$VMKFSTOOLS --server $DST_HOST --username $USERNAME --password $PASSWORD -U $DST_PATH' "Cannot delelete $DST"
exec_and_log "$VMKFSTOOLS --server $DST_HOST --username $USERNAME --password $PASSWORD -U $DST_PATH" "Cannot delelete $DST"
fi
exit 0

View File

@ -77,10 +77,10 @@ EOF
ssh_exec_and_log $DST_HOST "$MKSCRIPT" "Could not create image $DST_PATH"
else
# Two calls needed since vifs cannot do a mkdir -p
exec_and_log 'vifs $VI_PARAMS --mkdir "[$SYSTEM_DS_NAME] $VMID"' "Cannot create [$SYSTEM_DS_NAME] $VMID "
exec_and_log 'vifs $VI_PARAMS --mkdir "$DST_DIR_WITHOUT_DS_PATH"'
exec_and_log "vifs $VI_PARAMS --mkdir \"[$SYSTEM_DS_NAME] $VMID\"" "Cannot create [$SYSTEM_DS_NAME] $VMID"
exec_and_log "vifs $VI_PARAMS --mkdir \"$DST_DIR_WITHOUT_DS_PATH\""
exec_and_log "VMWARE_DISK_TYPE=`echo $FSTYPE|cut -d'_' -f 2`"
VMWARE_DISK_TYPE=`echo $FSTYPE|cut -d'_' -f 2`
exec_and_log "$VMKFSTOOLS $VI_PARAMS -U $DST_PATH/disk.vmdk"
exec_and_log "$VMKFSTOOLS $VI_PARAMS -c ${SIZE}M -d ${VMWARE_DISK_TYPE} $DST/disk.vmdk" "Cannot create $DST/disk.vmdk on $DST_HOST"
fi