mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-20 20:02:38 +09:00
feature-#1020: Add contextualization driver for vmware
This commit is contained in:
1 parent
de5fda93e6
commit
d062e6f351
4 files changed
+70
-1
No files matched your search
@@ -684,6 +684,7 @@ LVM_TM_COMMANDS_LIB_FILES="src/tm_mad/lvm/tm_clone.sh \
|
||||
VMWARE_TM_COMMANDS_LIB_FILES="src/tm_mad/vmware/tm_clone.sh \
|
||||
src/tm_mad/vmware/tm_ln.sh \
|
||||
src/tm_mad/vmware/tm_mv.sh"
|
||||
src/tm_mad/vmware/tm_context.sh"
|
||||
|
||||
VMWARE_TM_SSH_COMMANDS_LIB_FILES="src/tm_mad/vmware-ssh/tm_clone.sh \
|
||||
src/tm_mad/vmware-ssh/tm_ln.sh"
|
||||
|
||||
Executable
+67
@@ -0,0 +1,67 @@
|
||||
#!/bin/bash
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright 2010, C12G Labs S.L.
|
||||
#
|
||||
# This file is part of OpenNebula VMware Drivers.
|
||||
#
|
||||
# OpenNebula VMware Drivers is free software: you can redistribute it
|
||||
# and/or modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation, either version 3 of
|
||||
# the License, or the hope That it will be useful, but (at your
|
||||
# option) any later version.
|
||||
#
|
||||
# OpenNebula VMware Drivers is distributed in WITHOUT ANY WARRANTY;
|
||||
# without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
# A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with OpenNebula VMware Drivers . If not, see
|
||||
# <http://www.gnu.org/licenses/>
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
while (( "$#" )); do
|
||||
if [ "$#" == "1" ]; then
|
||||
DST=$1
|
||||
else
|
||||
SRC="$SRC $1"
|
||||
fi
|
||||
shift
|
||||
done
|
||||
|
||||
|
||||
if [ -z "${ONE_LOCATION}" ]; then
|
||||
TMCOMMON=/usr/lib/one/mads/tm_common.sh
|
||||
else
|
||||
TMCOMMON=$ONE_LOCATION/lib/mads/tm_common.sh
|
||||
fi
|
||||
|
||||
. $TMCOMMON
|
||||
|
||||
get_vmdir
|
||||
|
||||
DST_PATH=`arg_path $DST`
|
||||
|
||||
fix_dst_path
|
||||
|
||||
DST_DIR=`dirname $DST_PATH`
|
||||
ISO_DIR=$DST_DIR/isofiles
|
||||
|
||||
exec_and_log "mkdir -p $ISO_DIR"
|
||||
|
||||
for f in $SRC; do
|
||||
case $f in
|
||||
http://*)
|
||||
exec_and_log "$WGET -O $ISO_DIR $f"
|
||||
;;
|
||||
|
||||
*)
|
||||
exec_and_log "cp -R $f $ISO_DIR"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
exec_and_log "$MKISOFS -o $DST_PATH.iso -J -R $ISO_DIR"
|
||||
|
||||
exec_and_log "rm -rf $ISO_DIR"
|
||||
@@ -20,3 +20,4 @@ MKSWAP = dummy/tm_dummy.sh
|
||||
MKIMAGE = dummy/tm_dummy.sh
|
||||
DELETE = shared/tm_delete.sh
|
||||
MV = vmware/tm_mv.sh
|
||||
CONTEXT = vmware/tm_context.sh
|
||||
@@ -6,5 +6,5 @@ MKSWAP = ssh/tm_mkswap.sh
|
||||
MKIMAGE = ssh/tm_mkimage.sh
|
||||
DELETE = ssh/tm_delete.sh
|
||||
MV = ssh/tm_mv.sh
|
||||
CONTEXT = ssh/tm_context.sh
|
||||
CONTEXT = vmware/tm_context.sh
|
||||
|
||||
Reference in new issue
Block a user