summaryrefslogtreecommitdiffstats
path: root/os-plugins/plugins/vmware/files/run-virt.include
diff options
context:
space:
mode:
authorMichael Janczyk2009-03-05 23:07:53 +0100
committerMichael Janczyk2009-03-05 23:07:53 +0100
commit902e8c2a54ab762e9e50d21d16a5334c08597517 (patch)
treef8cb274d053693a2e47be09a3bd79ff5ca65946d /os-plugins/plugins/vmware/files/run-virt.include
parentadded cdrom and floppy support to virtualization (diff)
downloadcore-902e8c2a54ab762e9e50d21d16a5334c08597517.tar.gz
core-902e8c2a54ab762e9e50d21d16a5334c08597517.tar.xz
core-902e8c2a54ab762e9e50d21d16a5334c08597517.zip
changed hotkey true to lowercase, uppercase does not work :(
rearranged vmwares conffile, variables needed on top ->shared_folder var as usual test with -n does not workt with or without "" even check for [ "${cdrom1}x" = "x" ] didnt work, now i hate bash :( git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2683 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'os-plugins/plugins/vmware/files/run-virt.include')
-rw-r--r--os-plugins/plugins/vmware/files/run-virt.include108
1 files changed, 57 insertions, 51 deletions
diff --git a/os-plugins/plugins/vmware/files/run-virt.include b/os-plugins/plugins/vmware/files/run-virt.include
index 10f22f19..7ae843ea 100644
--- a/os-plugins/plugins/vmware/files/run-virt.include
+++ b/os-plugins/plugins/vmware/files/run-virt.include
@@ -23,8 +23,37 @@
runvmwareconfheader ()
{
- echo "# This configuration file was generated by $0
+echo "# This configuration file was generated by $0" >${conffile}
+case "$vmversion" in
+ 1.0|5.5)
+ shared_folder="FALSE"
+ echo "
+# version specific stuff
+config.version = \"8\"
+virtualHW.version = \"4\"" >>${conffile}
+ ;;
+ 2.0|6.0)
+ shared_folder="TRUE"
+ echo "
+# version specific stuff
+config.version = \"8\"
+virtualHW.version = \"6\"
+sharedFolder.option = \"alwaysEnabled\"" >>${conffile}
+ ;;
+ 2.5|6.5)
+ shared_folder="TRUE"
+ echo "
+# version specific stuff
+config.version = \"8\"
+virtualHW.version = \"7\"
+ehci.present= \"TRUE\"
+sharedFolder.option = \"alwaysEnabled\"
+mks.enable3d = \"FALSE\"" >>${conffile}
+ ;;
+esac
+
+echo "
# id
displayName = \"${displayname}\"
guestOS = \"${vmostype}\"
@@ -86,10 +115,6 @@ svga.autodetect = \"TRUE\"
usb.present = \"TRUE\"
usb.generic.autoconnect = \"TRUE\"
-# serial port
-serial0.present = \"${serial}\"
-${serialdev}" >${conffile}
-
# shared folders
sharedFolder0.present = \"TRUE\"
sharedFolder0.enabled = \"${shared_folder}\"
@@ -112,41 +137,17 @@ isolation.tools.dnd.disable = \"FALSE\"
isolation.tools.copy.enable = \"TRUE\"
isolation.tools.paste.enabled = \"TRUE\"
-case "$vmversion" in
- 1.0|5.5)
- shared_folder="FALSE"
- echo "
-# version specific stuff
-config.version = \"8\"
-virtualHW.version = \"4\"" >>${conffile}
- ;;
- 2.0|6.0)
- shared_folder="TRUE"
- echo "
-# version specific stuff
-config.version = \"8\"
-virtualHW.version = \"6\"
-sharedFolder.option = \"alwaysEnabled\"" >>${conffile}
- ;;
- 2.5|6.5)
- shared_folder="TRUE"
- echo "
-# version specific stuff
-config.version = \"8\"
-virtualHW.version = \"7\"
-ehci.present= \"TRUE\"
-sharedFolder.option = \"alwaysEnabled\"
-mks.enable3d = \"FALSE\"" >>${conffile}
- ;;
-esac
+# serial port
+serial0.present = \"${serial}\"
+${serialdev}" >>${conffile}
- # set the appropriate permissions for the vmware config file
- chmod u+rwx ${conffile} >/dev/null 2>&1
+# set the appropriate permissions for the vmware config file
+chmod u+rwx ${conffile} >/dev/null 2>&1
}
preferencesheader ()
{
- echo ".encoding = \"UTF-8\"
+echo ".encoding = \"UTF-8\"
# This configuration file was generated by $0
# updates/tips
@@ -161,11 +162,11 @@ prefvmx.defaultVMPath = \"${vmhome}\"
prefvmx.mru.config = \"${conffile}:\"
# hot keys
-pref.hotkey.control = \"TRUE\"
-pref.hotkey.alt = \"TRUE\"
-pref.hotkey.shift = \"TRUE\"
-pref.hotkey.gui = \"TRUE\"
-gui.restricted = \"TRUE\"
+pref.hotkey.control = \"true\"
+pref.hotkey.alt = \"true\"
+pref.hotkey.shift = \"true\"
+pref.hotkey.gui = \"true\"
+gui.restricted = \"true\"
# fullscreen/mouse/keyboard
pref.fullscreen.toolbarPixels = \"0\"
@@ -187,8 +188,7 @@ pref.eula.size = \"2\"
pref.eula.0.appName = \"VMware Player\"
pref.eula.0.buildNumber = \"${vmbuild}\"
pref.eula.1.appName = \"VMware Workstation\"
-pref.eula.1.buildNumber = \"${vmbuild}\"" \
- >${vmhome}/preferences
+pref.eula.1.buildNumber = \"${vmbuild}\"" >${vmhome}/preferences
}
# declaration of default variables
@@ -255,17 +255,23 @@ if [ "${mem}" -lt "256" ] || [ "${memhost}" -lt "256" ]; then
fi
# virtual fd/cd/dvd and drive devices, floppy b: for configuration
-floppy0="FALSE"
-# if $floppy_0 from run-virt.include set then floppy0="TRUE"
-[ -n "$floppy_0" ] && floppy0="TRUE"
+# if $floppy_0 from run-virt.include set then fdtest="TRUE"
+fdtest=
+fdtest=${floppy_0:+"TRUE"}
+# if $fdtest not set floppy0="FALSE", else "TRUE"
+floppy0=${fdtest:-"FALSE"}
floppy1="TRUE"
floppy1name="/var/lib/virt/vmchooser/loopimg/fd.img"
-cdrom0="FALSE"
-# if $cdrom_0 from run-virt.include set then cdrom0="TRUE"
-[ -n "$cdrom_0" ] && cdrom0="TRUE"
-cdrom1="FALSE"
-# if $cdrom_1 from run-virt.include set then cdrom1="TRUE"
-[ -n "$cdrom_1" ] && cdrom1="TRUE"
+# if $cdrom_0 from run-virt.include set then cdtest="TRUE"
+cdtest=
+cdtest=${cdrom_0:+"TRUE"}
+# if $cdtest not set cdrom0="FALSE", else "TRUE"
+cdrom0=${cdtest:-"FALSE"}
+# if $cdrom_1 from run-virt.include set then cdtest="TRUE"
+cdtest=
+cdtest=${cdrom_1:+"TRUE"}
+# if $cdtest not set cdrom1="FALSE", else "TRUE"
+cdrom1=${cdtest:-"FALSE"}
# ide is expected default, test for the virtual disk image type should
# be done while creating the runscripts ...
ide="TRUE"