From f71a8fe19c818d6bd86e0b6eb79744dcf17bb8e2 Mon Sep 17 00:00:00 2001 From: Volker Uhrig Date: Mon, 15 Oct 2007 18:55:42 +0000 Subject: sync with current used version. Basically scanner option included git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1384 95ad53e4-c205-0410-b2fa-d234c58c8868 --- virtualization/templates/runvmware-v2 | 44 +++++++++++++++++++++++++++++++---- 1 file changed, 40 insertions(+), 4 deletions(-) diff --git a/virtualization/templates/runvmware-v2 b/virtualization/templates/runvmware-v2 index 4e79e2fc..c61de300 100644 --- a/virtualization/templates/runvmware-v2 +++ b/virtualization/templates/runvmware-v2 @@ -4,7 +4,7 @@ # X Stations and interactive session chooser (v4) # # Author(s): see project authors file -# +# letzte Ă„nderung Dirk, 15.10. # Copyright: (c) 2003, 2006 - RZ Universitaet Freiburg # # Version: 0.16.611 @@ -12,6 +12,21 @@ ################################################################################ +################################################################################ +## +## Put $HOME to another location +## +################################################################################ + +# We need to change $HOME so it saves everything to /tmp +#export HOME="/tmp/${USER}" +# following mkdir we have now twice in this script... but better twice +# as not seperated. Now its no problem to delete this +# "Put $HOME to another location" section later +#mkdir /tmp/${USER} +#ln -s /home/${USER}/.Xauthority /tmp/${USER}/.Xauthority + + ### VARIABLES SECTION ########################################################## ## @@ -66,6 +81,8 @@ confile="${tmpdir}/runvmware.conf" # users vmware config folder vmhome="${HOME}/.vmware" +#vmhome="/tmp/${USER}/.vmware" + # unknow variables needed vor vmwplayer configuration confver=8 @@ -108,6 +125,7 @@ diskfile="${vmdir}/${imagename}" #grepping every file could take much (network) resources. And if its #an IDE Image, but has somewhere the string ddb.adapterType stuff can #become screwed +# NOOOOOOO - We do not check on every start on every client!!! # check if IDE or SCSI #hddrv=$(grep -m 1 -ia "ddb.adapterType" ${diskfile} | awk -F "\"" '{print $2}') #if [ "${hddrv}" = "ide" ]; then @@ -480,9 +498,27 @@ runvmwareconfheader # poolconfiguration config.xml #TODO: change default to global variable ${POOL} in the future -sed -e "s/HOSTNAME/${hostname}/" \ - -e "s/USER/${USER}/" /var/lib/vmware/templates/client-config.xml.default \ - > /etc/vmware/fd-loop/config.xml +#comment out cause of scanner... we do it now by hand... just a hack +#TODO: cleaner source... +#sed -e "s/HOSTNAME/${hostname}/" \ +# -e "s/USER/${USER}/" /var/lib/vmware/templates/client-config.xml.default \ +# > /etc/vmware/fd-loop/config.xml +echo "" > /etc/vmware/fd-loop/config.xml +echo " " >> /etc/vmware/fd-loop/config.xml +echo " " >> /etc/vmware/fd-loop/config.xml +echo " " >> /etc/vmware/fd-loop/config.xml +echo " " >> /etc/vmware/fd-loop/config.xml +echo " " >> /etc/vmware/fd-loop/config.xml +# if we have a scanner, then copy scannerinformation to this xml +sanelines="$(wc -l /etc/sane.d/net.conf|awk '{ print $1 };')" +if [ -f /etc/sane.d/net.conf ] && [ "${sanelines}" -eq 1 ]; then + echo "" \ + >> /etc/vmware/fd-loop/config.xml + echo "" >> /etc/vmware/fd-loop/config.xml +fi +echo " " >> /etc/vmware/fd-loop/config.xml +echo "" >> /etc/vmware/fd-loop/config.xml + # sync is needed to ensure that data is really written to virtual disk sync -- cgit v1.2.3-55-g7522