diff options
-rw-r--r-- | os-plugins/plugins/vmchooser/files/run-virt.sh | 18 | ||||
-rw-r--r-- | os-plugins/plugins/vmchooser/files/vmchooser | bin | 658596 -> 658596 bytes |
2 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) diff --git a/os-plugins/plugins/vmchooser/files/vmchooser b/os-plugins/plugins/vmchooser/files/vmchooser Binary files differindex 2a91665c..7155a574 100644 --- a/os-plugins/plugins/vmchooser/files/vmchooser +++ b/os-plugins/plugins/vmchooser/files/vmchooser |