summaryrefslogtreecommitdiffstats
path: root/remote/modules/vmchooser/data
diff options
context:
space:
mode:
Diffstat (limited to 'remote/modules/vmchooser/data')
-rw-r--r--remote/modules/vmchooser/data/etc/openslx/vmchooser/virtualization.conf8
-rwxr-xr-xremote/modules/vmchooser/data/opt/openslx/bin/run-virt.sh51
2 files changed, 33 insertions, 26 deletions
diff --git a/remote/modules/vmchooser/data/etc/openslx/vmchooser/virtualization.conf b/remote/modules/vmchooser/data/etc/openslx/vmchooser/virtualization.conf
new file mode 100644
index 00000000..8887ee6f
--- /dev/null
+++ b/remote/modules/vmchooser/data/etc/openslx/vmchooser/virtualization.conf
@@ -0,0 +1,8 @@
+totalmem=1000
+cpu_cores=1
+host_arch=i686
+vtflag=0
+hostmacaddr=00:0c:29:4e:ee:57
+hostip=132.230.4.54
+hostname=slx-client
+cdrom_0=/dev/sr0
diff --git a/remote/modules/vmchooser/data/opt/openslx/bin/run-virt.sh b/remote/modules/vmchooser/data/opt/openslx/bin/run-virt.sh
index b3863a2e..9314bb42 100755
--- a/remote/modules/vmchooser/data/opt/openslx/bin/run-virt.sh
+++ b/remote/modules/vmchooser/data/opt/openslx/bin/run-virt.sh
@@ -18,27 +18,25 @@
# fied virtualization tool.
################################################################################
-. /etc/opt/openslx/openslx.conf
-
################################################################################
### Define default dirs / get configs
################################################################################
-PLUGINCONFROOT=${OPENSLX_DEFAULT_CONFDIR}/plugins
-PLUGINCONFDIR=${PLUGINCONFROOT}/vmchooser
+PLUGINCONFROOT=/etc/opt/openslx/plugins
+PLUGINCONFDIR=/etc/opt/openslx/plugins/vmchooser
# include general configuration from vmchooser
-[ -f ${PLUGINCONFROOT}/vmchooser/vmchooser.conf ] && \
- . ${PLUGINCONFROOT}/vmchooser/vmchooser.conf
+[ -f /etc/openslx/vmchooser/vmchooser.conf ] && \
+ . /etc/openslx/vmchooser/vmchooser.conf
# load general virtualization information
-[ -f ${PLUGINCONFROOT}/virtualization/virtualization.conf ] && \
- . ${PLUGINCONFROOT}/virtualization/virtualization.conf
+[ -f /etc/openslx/vmchooser/virtualization.conf ] && \
+ . /etc/openslx/vmchooser/virtualization.conf
################################################################################
### Functions used throughout the script
################################################################################
# function to write to stdout and logfile
-LOGFILE=${OPENSLX_DEFAULT_LOGDIR}/run-virt.${USER}.$$.log
+LOGFILE=/var/log/openslx/run-virt.${USER}.$$.log
writelog () {
# write to stdout
echo -e "$1"
@@ -118,7 +116,7 @@ if ls ${xmlfile} 2>/dev/null | grep '/' >/dev/null 2>&1; then
xmlpath=$(dirname ${xmlfile})
xmlfile=$(basename ${xmlfile})
else
- xmlpath=${vmchooser_xmlpath}
+ xmlpath=${path}
fi
# full path
xmlfile="${xmlpath}/${xmlfile%.xml}.xml"
@@ -318,7 +316,7 @@ fdtest=${floppy_0:+"TRUE"}
# if $fdtest not set floppy0="FALSE", else "TRUE"
floppy0=${fdtest:-"FALSE"}
floppy1="TRUE"
-floppy1name="${PLUGINCONFDIR}/loopimg/fd.img"
+floppy1name="/etc/openslx/vmchooser/loopimg/fd.img"
# if $cdrom_0 from run-virt.include set then cdtest="TRUE"
cdtest=
cdtest=${cdrom_0:+"TRUE"}
@@ -379,30 +377,31 @@ writelog "\tVM Hostname:\t\t$hostname"
### Setup the rest of the environment and run the configured vm
################################################################################
+#TODO: ALSA MIXER IN STAGE32
# Adjust sound volume
-writelog "Unmuting sound...\c "
-amixer -q sset Master 80% unmute 2>/dev/null
-amixer -q sset PCM 80% unmute 2>/dev/null
-amixer -q sset CD 80% unmute 2>/dev/null
-amixer -q sset Headphone 80% unmute 2>/dev/null
-amixer -q sset Front 80% unmute 2>/dev/null # in SUSE 11.0 it's headphone
-amixer -q sset Speaker 80% unmute 2>/dev/null # annoying built-in speaker
-writelog "finished\n"
+#writelog "Unmuting sound...\c "
+#amixer -q sset Master 80% unmute 2>/dev/null
+#amixer -q sset PCM 80% unmute 2>/dev/null
+#amixer -q sset CD 80% unmute 2>/dev/null
+#amixer -q sset Headphone 80% unmute 2>/dev/null
+#amixer -q sset Front 80% unmute 2>/dev/null # in SUSE 11.0 it's headphone
+#amixer -q sset Speaker 80% unmute 2>/dev/null # annoying built-in speaker
+#writelog "finished\n"
# Copy guest configuration (with added information) config.xml to be accessed
# via virtual floppy
# fixme -> to be changed (vmchooser adapts the file content!?)
#TODO: wozu echo?
#echo "Please fix the config.xml generation"
-cp ${xmlfile} ${PLUGINCONFDIR}/fd-loop/config.xml
+cp ${xmlfile} /etc/openslx/vmchooser/fd-loop/config.xml
# Get all virtual machine specific stuff from the respective include file
-if [ -e ${PLUGINCONFROOT}/${xmlvirt}/run-virt.include ] ; then
+if [ -e /etc/openslx/${xmlvirt}/run-virt.include ] ; then
self=${xmlvirt}
- . ${PLUGINCONFROOT}/${xmlvirt}/run-virt.include
+ . /etc/openslx/${xmlvirt}/run-virt.include
# start a windowmanager for easier handling
# (expect problems /w windows opening in background /w vmware without wm)
- for dm in xfwm4 metacity openbox blackbox kwin fvwm2 ; do
+ for dm in twm xfwm4 metacity openbox blackbox kwin fvwm2 ; do
if which $dm >/dev/null 2>&1 ; then
if [ "$dm" = "fvwm2" ] ; then
echo "EdgeScroll 0 0" > ${redodir}/fvwm
@@ -414,9 +413,9 @@ if [ -e ${PLUGINCONFROOT}/${xmlvirt}/run-virt.include ] ; then
fi
done
# Start poolvideoswitch if we find the autostarter file
- if [ -e /etc/xdg/autostart/pvsgui.desktop ]; then
- /usr/local/bin/pvsgui -p 2 -b >/dev/null 2>&1 &
- fi
+ #if [ -e /etc/xdg/autostart/pvsgui.desktop ]; then
+ # /usr/local/bin/pvsgui -p 2 -b >/dev/null 2>&1 &
+ #fi
eval ${VIRTCMD} ${VIRTCMDOPTS}
writelog "Bye."