diff options
author | Bastian Wissler | 2009-03-09 20:19:45 +0100 |
---|---|---|
committer | Bastian Wissler | 2009-03-09 20:19:45 +0100 |
commit | 9f6bdb3dd8c43d0e2a9494e5ce85f7b9a06811a2 (patch) | |
tree | c50c393966a2e81baffd173877bc7e62729e00bb /os-plugins/plugins/vmchooser/files/run-virt.sh | |
parent | hwver is image and not version specific. it will be written now automatically (diff) | |
download | core-9f6bdb3dd8c43d0e2a9494e5ce85f7b9a06811a2.tar.gz core-9f6bdb3dd8c43d0e2a9494e5ce85f7b9a06811a2.tar.xz core-9f6bdb3dd8c43d0e2a9494e5ce85f7b9a06811a2.zip |
vmchooser plugin:
* new vmchooser binary (version 0.0.8) with xml-at-once support
* added case for the file path confusion in run-virt.sh
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2705 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'os-plugins/plugins/vmchooser/files/run-virt.sh')
-rw-r--r-- | os-plugins/plugins/vmchooser/files/run-virt.sh | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/os-plugins/plugins/vmchooser/files/run-virt.sh b/os-plugins/plugins/vmchooser/files/run-virt.sh index 65e61499..b9992c12 100644 --- a/os-plugins/plugins/vmchooser/files/run-virt.sh +++ b/os-plugins/plugins/vmchooser/files/run-virt.sh @@ -35,12 +35,20 @@ xml=$1 # File name of the image imagename=$(grep -io "<image_name param=.*\"" ${xml} | awk -F "\"" '{ print $2 }') -# Path to the image (readlink produces the absolute path if called relatively) -# imgpath=$(grep -io "<path_to param=.*\"" ${xml} | awk -F "\"" '{ print $2 }') -[ -z $imgpath ] && { imgpath=$(readlink -f $xml); imgpath=${imgpath%/*.xml}; } +case ${xml} in + /tmp/*) + # we do not need folder name as it is already included by vmchooser + diskfile=$imagename + ;; + *) + # Path to the image (readlink produces the absolute path if called relatively) + [ -z $imgpath ] && \ + { imgpath=$(readlink -f $xml); imgpath=${imgpath%/*.xml}; } + # Diskfile is file including absolute path to it + diskfile=$imgpath/$imagename + ;; +esac -# Diskfile is file including absolute path to it -diskfile=$imgpath/$imagename [ -e $diskfile ] || { echo -e "\n\tImage file $diskfile not found!"; exit 1; } # Short description of the image (as present in the vmchooser menu line) |