summaryrefslogtreecommitdiffstats
path: root/os-plugins/plugins/vmchooser/files/run-virt.sh
diff options
context:
space:
mode:
authorMichael Janczyk2009-11-03 20:07:51 +0100
committerMichael Janczyk2009-11-03 20:07:51 +0100
commit39466a0472f46c3e6c4c84a4751d435a3a191eb5 (patch)
treecc26155cf8597cb66d8e29e28f252f87f15ae623 /os-plugins/plugins/vmchooser/files/run-virt.sh
parentbugfix create dir (diff)
downloadcore-39466a0472f46c3e6c4c84a4751d435a3a191eb5.tar.gz
core-39466a0472f46c3e6c4c84a4751d435a3a191eb5.tar.xz
core-39466a0472f46c3e6c4c84a4751d435a3a191eb5.zip
more OpenSLX path optimizations
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@3184 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'os-plugins/plugins/vmchooser/files/run-virt.sh')
-rw-r--r--os-plugins/plugins/vmchooser/files/run-virt.sh38
1 files changed, 25 insertions, 13 deletions
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 <<EOL
@@ -223,14 +235,14 @@ writelog "finished\n"
# via virtual floppy
# fixme -> 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