diff options
author | Bastian Wissler | 2009-02-26 20:38:42 +0100 |
---|---|---|
committer | Bastian Wissler | 2009-02-26 20:38:42 +0100 |
commit | 657b24199c54a510eb9c984fa9c8767faf3c7ed8 (patch) | |
tree | f653f012ed6497cc5aff4e20d64e7ce93b80af0f /os-plugins | |
parent | Load IDE disk module (needed for older kernels). (diff) | |
download | core-657b24199c54a510eb9c984fa9c8767faf3c7ed8.tar.gz core-657b24199c54a510eb9c984fa9c8767faf3c7ed8.tar.xz core-657b24199c54a510eb9c984fa9c8767faf3c7ed8.zip |
vmware / vmchooser /xserver:
* cleanup checkin
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2649 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'os-plugins')
-rw-r--r-- | os-plugins/plugins/vmchooser/files/run-virt.sh | 6 | ||||
-rw-r--r-- | os-plugins/plugins/vmware/files/run-virt.include | 3 | ||||
-rwxr-xr-x | os-plugins/plugins/xserver/files/linkage.sh | 158 |
3 files changed, 4 insertions, 163 deletions
diff --git a/os-plugins/plugins/vmchooser/files/run-virt.sh b/os-plugins/plugins/vmchooser/files/run-virt.sh index 0a9919c2..8ba8ea75 100644 --- a/os-plugins/plugins/vmchooser/files/run-virt.sh +++ b/os-plugins/plugins/vmchooser/files/run-virt.sh @@ -65,13 +65,13 @@ if [ -z ${virt_mach} ] ; then fi # definition of the client system -vmostype=$(grep -io "<os param=\"" ${xml} | awk -F "\"" '{ print $2 }') +vmostype=$(grep -io "<os param=.*\"" ${xml} | awk -F "\"" '{ print $2 }') # definition of the networking the client system is connected to -network_kind=$(grep -io "<network param=\"" ${xml} | awk -F "\"" '{ print $2 }') +network_kind=$(grep -io "<network param=.*\"" ${xml} | awk -F "\"" '{ print $2 }') # serial port defined (e.g. "ttyS0" or "autodetect") -serial=$(grep -io "<serial port=\"" ${xml} | awk -F "\"" '{ print $2 }') +serial=$(grep -io "<serial port=.*\"" ${xml} | awk -F "\"" '{ print $2 }') # declaration of default variables diff --git a/os-plugins/plugins/vmware/files/run-virt.include b/os-plugins/plugins/vmware/files/run-virt.include index c9430098..cb1d23b9 100644 --- a/os-plugins/plugins/vmware/files/run-virt.include +++ b/os-plugins/plugins/vmware/files/run-virt.include @@ -20,8 +20,7 @@ runvmwareconfheader () { - echo ".encoding = \"UTF-8\" -# This configuration file was generated by $0 + echo "# This configuration file was generated by $0 # id displayName = \"${displayname}\" diff --git a/os-plugins/plugins/xserver/files/linkage.sh b/os-plugins/plugins/xserver/files/linkage.sh deleted file mode 100755 index da66294a..00000000 --- a/os-plugins/plugins/xserver/files/linkage.sh +++ /dev/null @@ -1,158 +0,0 @@ -#!/bin/bash - -# -# -# general: linking libGL.so and stuff to writable locations -# -# - -PLUGIN_PATH="/opt/openslx/plugin-repo/xserver/" - -# this has to be writable in stage3 -LINK_PATH="/var/X11R6/lib/" - -# these are to link libs to -ATIROOT="${PLUGIN_PATH}ati" -NVROOT="${PLUGIN_PATH}nvidia" - -# this is the diversion path of libraries -if [ ! -d "${LINK_PATH}" ]; then - mkdir -p "${LINK_PATH}" -fi - - -VAL=0 # this is the return value of following helper functions -stripstr() { - VAL=$(echo ${1} | sed -e "s,^${2},,g") -} -stripbase() { - VAL=$(echo ${1} | sed -e "s,$(basename ${1}),,g") -} - - - -## additional helper functions without return value -# moves mesa lib to backup -mvmesa() { - MESALIB="$(echo ${1} | sed -e 's,\.so,_MESA.so,g')" - mv ${1} ${MESALIB} -} - -# makes dir, if not exists -testmkdir() { - if [ ! -d ${1} ]; then - mkdir -p ${1} - fi -} - - -####################################### -# -# Link all files FROM $1 to /usr/lib/ -# -# Conflicting files are linked to -# /var/X11R6/lib -# -# mesa files are renamed to *_MESA.so* -# -####################################### -divert() { - - ROOT="${1}" - RR="/usr/lib" - LPATH="/var/X11R6/lib" - - # link all shared objects in ${1} - for lib in $(find ${ROOT} -wholename \ - "*/xorg/modules" -prune -a '!' -type d -o -name '*so*'); do - - # strip leading ROOT - to get e.g.: "/usr/lib/libGL.so.1.2" - stripstr ${lib} ${ROOT} - rlib=${VAL} - # strip leading /usr/lib/ - name for /var/X11R6/lib - stripstr ${rlib} ${RR} - divname=${VAL} - rootname=${RR} - if [ "${VAL}" = "${rlib}" ]; then - # Nothing has been stripped - sounds like /usr/X11R6 etc. - stripstr ${rlib} "/usr/X11R6/lib" - divname=${VAL} - rootname="/usr/X11R6/lib" - fi - - - #echo "${lib} ${rlib} ${divname} after stripping" - - # divert, if exists - if [ -e ${rlib} ]; then - # back up mesa file - mvmesa ${rlib} - # link to /var/X11R6/lib - ln -sf ${LPATH}${divname} ${rlib} - else - # it does not exist in /usr/lib/ - # just create folder and link - stripbase ${divname} - testmkdir ${rootname}${VAL} - ln -sf ${lib} ${rlib} - fi - - done - - touch ${ROOT}/installed -} - - -############################################### -# remove all links from system fs -# -# just run this function to clean up system -############################################### -uninstDist() { - # put mesa implementation back into place - for file in $(find /usr/lib/ -name '*_MESA.so*' | xargs); do - mesafile="$(echo ${file}|sed -e 's/_MESA.so/.so/')" - mv ${file} ${mesafile} - done - - # somehow we have to repair this - what else? - # There is also a generic way, but this is only one file - ln -sf /usr/lib/libGL.so.1.2 /usr/lib/libGL.so.1 - ln -sf /usr/lib/libGL.so.1.2 /usr/lib/libGL.so - - # delete all remaining links to /opt/openslx and /var/X11R6/lib - find /usr/lib /usr/X11R6/lib -lname "${PLUGIN_PATH}*" \ - -o -lname "${LINK_PATH}*" |xargs rm -rf - # delete LINK_PATH - rm -rf ${LINK_PATH} -} - -if [ "$1" = "clean" ]; then - uninstDist - exit -fi - -if [ "$1" = "both" ]; then - divert $NVROOT - divert $ATIROOT -# /bin/bash - exit -fi - -if [ "$1" = "nvidia" ]; then - divert ${NVROOT} - exit -fi - -if [ "$1" = "ati" ]; then - divert ${ATIROOT} - exit -fi - - - - - - - - |