From d02762d84cf473207cc924a7c3508a7b0f16ea00 Mon Sep 17 00:00:00 2001 From: Michael Janczyk Date: Fri, 20 Mar 2009 15:53:57 +0000 Subject: vmchooser: if you start from a dm you do not want to hear that a dm is already started vmware: shorter check for vmware-images. check for flat images removed, because now only the first 30 lines are checked. and flat images can't be started without a header-vmdk anyway. git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2750 95ad53e4-c205-0410-b2fa-d234c58c8868 --- os-plugins/plugins/vmchooser/files/run-virt.sh | 2 +- os-plugins/plugins/vmware/files/run-virt.include | 29 +++++++++++------------- 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/os-plugins/plugins/vmchooser/files/run-virt.sh b/os-plugins/plugins/vmchooser/files/run-virt.sh index c0cad9d7..87d7abf3 100644 --- a/os-plugins/plugins/vmchooser/files/run-virt.sh +++ b/os-plugins/plugins/vmchooser/files/run-virt.sh @@ -236,7 +236,7 @@ if [ -e /etc/opt/openslx/run-${virt_mach}.include ] ; then echo "EdgeScroll 0 0" > ${redodir}/fvwm fvwm2 -f ${redodir}/fvwm >/dev/null 2>&1 & else - $dm & + $dm >/dev/null 2>&1 & fi break fi diff --git a/os-plugins/plugins/vmware/files/run-virt.include b/os-plugins/plugins/vmware/files/run-virt.include index 72037f5f..f74a4b63 100644 --- a/os-plugins/plugins/vmware/files/run-virt.include +++ b/os-plugins/plugins/vmware/files/run-virt.include @@ -288,25 +288,22 @@ vmversion=$version vmopt="-X" # check if ide/scsi and hwver of image -# *-flat.vmdk images are started via the vmdk file, so there's no need to -# exclude these flat files, we do it anyway -# read the first 22 lines otherwise it takes too much time (see #400) -if [ $(echo ${imagename} | grep -cv "\-flat.vmdk") ]; then - hddrv=$(head -22 ${diskfile} | grep -m1 -ia "ddb.adapterType" |\ - awk -F '"' '{print $2}') - hwver=$(head -22 ${diskfile} | grep -m1 -ia "ddb.virtualHWVersion" |\ - awk -F '"' '{print $2}') - if [ "${hddrv}" = "ide" ]; then +# read only the first 30 lines to be shure +imghead=$(head -30 ${diskfile}) +hddrv=$(echo "${imghead}" | grep -m1 -ia "ddb.adapterType" |\ + awk -F '"' '{print $2}') +hwver=$(echo "${imghead}" | grep -m1 -ia "ddb.virtualHWVersion" |\ + awk -F '"' '{print $2}') +case "${hddrv}" in + ide) ide="TRUE" scsi="FALSE" - elif [ "${hddrv}" = "lsilogic" ]; then - ide="FALSE" - scsi="TRUE" - elif [ "${hddrv}" = "buslogic" ]; then + ;; + lsilogic|buslogic) ide="FALSE" - scsi="TRUE" - fi -fi + scsi="TRUE" + ;; +esac ### log function ############################################################### # function to write to stdout and logfile -- cgit v1.2.3-55-g7522