summaryrefslogblamecommitdiffstats
path: root/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/includes/set_vmware_include_variables.inc
blob: 78f8c634b6c5ea608a454aed1dfe0b032d526b27 (plain) (tree)










































                                                                                                
#####################################################################
# Include: Declaration of vmware run-virt-include default variables #
#####################################################################

set_vmware_include_variables() {
	[ "$mem" -gt 3800 -a "$(uname -m)" != "x86_64" ] && mem=3800
	
	# VM-ID static (0D), remove if changed to 00
	VM_ID="0D"
	
	# should be dynamic
	if [ "x$(which bc)" != "x" ]; then
	        VM_ID=$(echo "obase=16; $$" | bc)
	        VM_ID=$(expr substr $VM_ID $(expr ${#VM_ID} - 1) 2)
	else
	        VM_ID=$[ $$ % 100 ]
	fi
	
	# temporary disk space for logs, etc...
	redodir=/tmp/virt/vmware/${USER}.$$
	
	# dir for configs and vmem file
	confdir=/tmp/virt/vmware/${USER}.$$
	
	# configfile
	conffile="${confdir}/run-vmware.conf"
	
	# diskfile
	diskfile="${vmpath}"
	
	# users vmware config folder
	[ -z "${HOME}" ] && HOME=$(getent passwd "$(/usr/bin/whoami)" | awk -F ':' '{print $6}')
	vmhome="${HOME}/.vmware"
	
	# get several version infos for vmware/player
	source /opt/openslx/vmchooser/vmware/vmware.conf
	vmbuild=$buildversion
	vmversion=$version
	
	# VMware start options
	# "-X": start in fullscreen
	vmopt="-X"
}