diff options
author | Volker Uhrig | 2007-10-15 20:55:42 +0200 |
---|---|---|
committer | Volker Uhrig | 2007-10-15 20:55:42 +0200 |
commit | f71a8fe19c818d6bd86e0b6eb79744dcf17bb8e2 (patch) | |
tree | ea4900d62fc75d97f1f475ac20fc19e98158d93e /virtualization | |
parent | Wait longer before loading the next module ... (diff) | |
download | core-f71a8fe19c818d6bd86e0b6eb79744dcf17bb8e2.tar.gz core-f71a8fe19c818d6bd86e0b6eb79744dcf17bb8e2.tar.xz core-f71a8fe19c818d6bd86e0b6eb79744dcf17bb8e2.zip |
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
Diffstat (limited to 'virtualization')
-rw-r--r-- | virtualization/templates/runvmware-v2 | 44 |
1 files 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 "<settings>" > /etc/vmware/fd-loop/config.xml +echo " <eintrag>" >> /etc/vmware/fd-loop/config.xml +echo " <computername param=\"${hostname}\">" >> /etc/vmware/fd-loop/config.xml +echo " </computername>" >> /etc/vmware/fd-loop/config.xml +echo " <username param=\"${USER}\">" >> /etc/vmware/fd-loop/config.xml +echo " </username>" >> /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 "<scanner param=\"$(cat /etc/sane.d/net.conf)\">" \ + >> /etc/vmware/fd-loop/config.xml + echo "</scanner>" >> /etc/vmware/fd-loop/config.xml +fi +echo " </eintrag>" >> /etc/vmware/fd-loop/config.xml +echo "</settings>" >> /etc/vmware/fd-loop/config.xml + # sync is needed to ensure that data is really written to virtual disk sync |