summaryrefslogtreecommitdiffstats
path: root/src/os-plugins/plugins/vmware/files/run-virt.include
diff options
context:
space:
mode:
Diffstat (limited to 'src/os-plugins/plugins/vmware/files/run-virt.include')
-rw-r--r--src/os-plugins/plugins/vmware/files/run-virt.include95
1 files changed, 60 insertions, 35 deletions
diff --git a/src/os-plugins/plugins/vmware/files/run-virt.include b/src/os-plugins/plugins/vmware/files/run-virt.include
index 3ec8eafc..86efb1a8 100644
--- a/src/os-plugins/plugins/vmware/files/run-virt.include
+++ b/src/os-plugins/plugins/vmware/files/run-virt.include
@@ -22,74 +22,86 @@ runvmwareconfheader ()
{
echo "# This configuration file was generated by $0" >${conffile}
-case "$vmversion" in
- *)
- svga_autodetect="TRUE"
- numvcpus="1"
- shared_folder="FALSE"
- echo ".encoding = \"UTF-8\"
-# version specific stuff - all versions
-config.version = \"8\"" >>${conffile}
- ;;
-esac
-case "$vmversion" in
- 2.*|3.*|4.*|6.*|7.*|8.*)
- shared_folder="TRUE"
- echo "
-# version specific stuff - ver. 2.*|3.*|6.*|7.*
-sharedFolder.option = \"alwaysEnabled\"" >>${conffile}
- ;;
-esac
-case "$vmversion" in
- 2.5|3.*|4.*|6.5|7.*|8.*)
- if [ "${cpu_cores}" -ge "2" 2>/dev/null ]; then
- numvcpus="2"
- fi
- cap3d="TRUE" # helper var for loging output
- echo "
-# version specific stuff - ver. 2.5|3.*|6.5|7.*
-ehci.present = \"TRUE\"
-mks.enable3d = \"${enable3d}\"" >>${conffile}
- ;;
-esac
# check for the ostype
case "${vmostype}" in
win31*)
mem="32"
cpu_cores="1"
sound="sb16"
+ shfolders="FALSE"
;;
win95*)
mem="92"
cpu_cores="1"
+ shfolders="FALSE"
;;
win98*|winme*)
mem="256"
cpu_cores="1"
+ shfolders="FALSE"
;;
winxp*|windowsxp*)
+ shfolders="TRUE"
;;
winvista*|windowsvista*)
+ shfolders="TRUE"
;;
windows7*)
+ shfolders="TRUE"
+ ;;
+ windows8*)
+ shfolders="TRUE"
;;
linux*|*ubuntu*|*suse*|debian*|*sci*)
vmostype="linux"
+ shfolders="TRUE"
;;
macos*)
cpu_cores="1"
vmostype="other"
+ shfolders="FALSE"
;;
beos*)
cpu_cores="1"
vmostype="other"
+ shfolders="FALSE"
;;
*)
vmostype="other"
+ shfolders="FALSE"
+ ;;
+esac
+case "$vmversion" in
+ *)
+ svga_autodetect="TRUE"
+ numvcpus="1"
+ shfolders="FALSE"
+ echo ".encoding = \"UTF-8\"
+# version specific stuff - all versions
+config.version = \"8\"" >>${conffile}
+ ;;
+esac
+case "$vmversion" in
+ 2.*|3.*|4.*|6.*|7.*|8.*|9.*)
+ echo "
+# version specific stuff - ver. 2.*|3.*|6.*|7.*|8.*|9.*
+sharedFolder.option = \"alwaysEnabled\"" >>${conffile}
+ ;;
+esac
+case "$vmversion" in
+ 2.5|3.*|4.*|6.5|7.*|8.*)
+ if [ "${cpu_cores}" -ge "2" 2>/dev/null ]; then
+ numvcpus="2"
+ fi
+ cap3d="TRUE" # helper var for loging output
+ echo "
+# version specific stuff - ver. 2.5|3.*|6.5|7.*
+ehci.present = \"TRUE\"
+mks.enable3d = \"${enable3d}\"" >>${conffile}
;;
esac
case "$vmversion" in
- 3.*|4.*|7.*|8.*)
+ 3.*|4.*|7.*|8.*|9.*)
numvcpus="${cpu_cores}"
if [ "${cpu_cores}" -ge "4" 2>/dev/null ]; then
numvcpus="4"
@@ -176,9 +188,15 @@ svga.autodetect = \"${svga_autodetect}\"
usb.present = \"TRUE\"
usb.generic.autoconnect = \"TRUE\"
+# pci configuration
+usb.pciSlotNumber = "16"
+ethernet0.pciSlotNumber = "17"
+sound.pciSlotNumber = "18"
+ehci.pciSlotNumber = "19"
+
# shared folders
-sharedFolder0.present = \"TRUE\"
-sharedFolder0.enabled = \"${shared_folder}\"
+sharedFolder0.present = \"${shfolders}\"
+sharedFolder0.enabled = \"${shfolders}\"
sharedFolder0.expiration = \"never\"
sharedFolder0.guestName = \"${sharename}\"
sharedFolder0.hostPath = \"${sharepath}\"
@@ -306,8 +324,8 @@ fi
sound="es1371"
# check for 3D configuration setting
-case "$enable3d" in
- *true*|*TRUE*|*yes*|*YES*)
+case "${enable3d}" in
+ *true*|*yes*)
enable3d="TRUE"
;;
*)
@@ -492,6 +510,13 @@ writelog ""
# finally set env for run-virt.sh
################################################################################
+# configure and start samba service to provide user's home directory
+if [ -f /usr/sbin/smbd ] ; then
+ sudo /opt/openslx/rootfs/bin/sed -i /etc/vmware/smb.conf -e "s,$USER,USER,"
+ sudo /usr/sbin/nmbd -c /etc/vmware/smb.conf
+ sudo /usr/sbin/smbd -c /etc/vmware/smb.conf
+fi
+
# using the modified version of the wrapper script
VIRTCMD="${OPENSLX_DEFAULT_BINDIR}/vmplayer"
VIRTCMDOPTS="${vmopt} ${conffile}"