summaryrefslogtreecommitdiffstats
path: root/os-plugins
diff options
context:
space:
mode:
authorSebastian Schmelzer2008-10-20 22:05:19 +0200
committerSebastian Schmelzer2008-10-20 22:05:19 +0200
commit2577d46aaa0608e4835cd478e96de250eee7d6d1 (patch)
tree1b1ab6dd8cad1c0cecd49a6a02d42de868f5edab /os-plugins
parent * finaly fixed ubuntu hotplug stuff (diff)
downloadcore-2577d46aaa0608e4835cd478e96de250eee7d6d1.tar.gz
core-2577d46aaa0608e4835cd478e96de250eee7d6d1.tar.xz
core-2577d46aaa0608e4835cd478e96de250eee7d6d1.zip
* (re)added ide/scsi check (for non flat files)
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2364 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'os-plugins')
-rw-r--r--os-plugins/plugins/vmware/files/runvmware-player-v2532
1 files changed, 18 insertions, 14 deletions
diff --git a/os-plugins/plugins/vmware/files/runvmware-player-v25 b/os-plugins/plugins/vmware/files/runvmware-player-v25
index 8bf63928..6f4021f3 100644
--- a/os-plugins/plugins/vmware/files/runvmware-player-v25
+++ b/os-plugins/plugins/vmware/files/runvmware-player-v25
@@ -6,10 +6,10 @@
# orwards it into B drive of vmplayer
#
# Author(s): see project authors file
-# last changes mj0, 17/10/2008
+# last changes mj0, 20/10/2008
# Copyright: (c) 2003 - 2008 - RZ Universitaet Freiburg
#
-# Version: 0.19
+# Version: 0.19.1
#
################################################################################
@@ -155,19 +155,23 @@ diskfile="${vmdir}/${imagename}"
#an IDE Image, but has somewhere the string ddb.adapterType stuff can
#become screwed
# NOOOOOOO - We do not check on every start on every client!!!
+# NOOOOOOOOO the string ddb.adapterType we are looking for is part of the
+# header of EVERY vmdk file (except *-flat.vmdk files) and is located in
+# the first ~30 lines - so it's not that big deal grepping for it :)
# check if IDE or SCSI
-#hddrv=$(grep -m 1 -ia "ddb.adapterType" ${diskfile} | awk -F "\"" '{print $2}')
-#if [ "${hddrv}" = "ide" ]; then
-# ide="TRUE"
-# scsi="FALSE"
-#elif [ "${hddrv}" = "lsilogic" ]; then
-# ide="FALSE"
-# scsi="TRUE"
-#elif [ "${hddrv}" = "buslogic" ]; then
-# ide="FALSE"
-# scsi="TRUE"
-#fi
-
+if [ $(echo ${imagename} | grep -cv "\-flat.vmdk") ]; then
+ hddrv=$(grep -m 1 -ia "ddb.adapterType" ${diskfile} | awk -F "\"" '{print $2}')
+ if [ "${hddrv}" = "ide" ]; then
+ ide="TRUE"
+ scsi="FALSE"
+ elif [ "${hddrv}" = "lsilogic" ]; then
+ ide="FALSE"
+ scsi="TRUE"
+ elif [ "${hddrv}" = "buslogic" ]; then
+ ide="FALSE"
+ scsi="TRUE"
+ fi
+fi
# command line variables
# start with this this default commmand line options + extra