From 39466a0472f46c3e6c4c84a4751d435a3a191eb5 Mon Sep 17 00:00:00 2001 From: Michael Janczyk Date: Tue, 3 Nov 2009 19:07:51 +0000 Subject: more OpenSLX path optimizations git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@3184 95ad53e4-c205-0410-b2fa-d234c58c8868 --- os-plugins/plugins/vmchooser/files/run-virt.sh | 38 +++++++++++++++++--------- 1 file changed, 25 insertions(+), 13 deletions(-) (limited to 'os-plugins/plugins/vmchooser/files/run-virt.sh') diff --git a/os-plugins/plugins/vmchooser/files/run-virt.sh b/os-plugins/plugins/vmchooser/files/run-virt.sh index 910cf128..4d210b88 100644 --- a/os-plugins/plugins/vmchooser/files/run-virt.sh +++ b/os-plugins/plugins/vmchooser/files/run-virt.sh @@ -20,6 +20,9 @@ # include default directories . /etc/opt/openslx/openslx.conf +PLUGINCONFDIR=${OPENSLX_DEFAULT_CONFDIR}/plugins/vmchooser +# include general configuration from vmchooser +. ${PLUGINCONFDIR}/run-virt.include # Sanity checks ############################################################################### @@ -107,13 +110,25 @@ totalmem=$(expr $(grep -i "memtotal" /proc/meminfo | awk '{print $2}') / 1024) mac=$(/sbin/ifconfig eth0 | grep eth0 | sed -e "s/ //g" \ | awk -F ":" '{print $(NF-1)":"$NF}') -# Virtual fd/cd/dvd and drive devices, floppy b: for configuration file (xml) -floppya="FALSE" -floppyb="TRUE" -floppybname="/etc/vmware/loopimg/fd.img" -cdr_1="FALSE" -cdr_2="FALSE" -# IDE is expected default, test for the virtual disk image type should +# virtual fd/cd/dvd and drive devices, floppy b: for configuration +# 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="${PLUGINCONFDIR}/loopimg/fd.img" +# 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" scsi="FALSE" @@ -195,9 +210,6 @@ writelog () # gured ################################################################################ -# The PATH... -export PATH="${PATH}:/var/X11R6/bin:/usr/X11R6/bin" - # Logo for console cat < to be changed (vmchooser adapts the file content!?) echo "Please fix the config.xml generation" -cp ${xml} /var/lib/virt/vmchooser/fd-loop/config.xml +cp ${xml} ${PLUGINCONFDIR}/fd-loop/config.xml # Check if virtual machine container file exists filecheck # Get all virtual machine specific stuff from the respective include file -if [ -e /etc/opt/openslx/run-${virt_mach}.include ] ; then - . /etc/opt/openslx/run-${virt_mach}.include +if [ -e ${PLUGINCONFDIR}/run-${virt_mach}.include ] ; then + . PLUGINCONFDIR/run-${virt_mach}.include # start a windowmanager for player 2+ # otherwise expect problems with windows opening in background if [ "${virt_mach}" = "vmware" ]; then -- cgit v1.2.3-55-g7522