mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
feature #1112: minor fixes for the datastore driver
This commit is contained in:
parent
fb95a2f88b
commit
b6ae3bce87
@ -20,21 +20,15 @@
|
||||
DRIVER_NAME=`basename $0 | cut -d. -f1`
|
||||
|
||||
if [ -z "${ONE_LOCATION}" ]; then
|
||||
DRIVERRC=/etc/one/${DRIVER_NAME}/${DRIVER_NAME}rc
|
||||
MADCOMMON=/usr/lib/one/mads/madcommon.sh
|
||||
VAR_LOCATION=/var/lib/one
|
||||
else
|
||||
DRIVERRC=$ONE_LOCATION/etc/${DRIVER_NAME}/${DRIVER_NAME}rc
|
||||
MADCOMMON=$ONE_LOCATION/lib/mads/madcommon.sh
|
||||
VAR_LOCATION=$ONE_LOCATION/var
|
||||
fi
|
||||
|
||||
. $MADCOMMON
|
||||
|
||||
# Export the im_mad specific rc
|
||||
|
||||
export_rc_vars $DRIVERRC
|
||||
|
||||
# Go to var directory ONE_LOCATION/var or /var/lib/one
|
||||
cd $VAR_LOCATION
|
||||
|
||||
|
@ -119,7 +119,7 @@ class DatastoreDriver < OpenNebulaDriver
|
||||
end
|
||||
|
||||
def do_image_action(id, ds, action, arguments)
|
||||
return if not is_available?(ds,id,:mv)
|
||||
return if not is_available?(ds,id,action)
|
||||
|
||||
path = File.join(@local_scripts_path, ds)
|
||||
cmd = File.join(path, ACTION[action].downcase)
|
||||
|
Loading…
x
Reference in New Issue
Block a user