summaryrefslogblamecommitdiffstats
path: root/os-plugins/plugins/pvs/XX_pvs.sh
blob: e96f5a63ce7132ea1f7982ea9adb0a96a5790a32 (plain) (tree)













































                                                                              
# Copyright (c) 2009 - RZ Uni Freiburg
# Copyright (c) 2009 - OpenSLX GmbH
#
# This program/file is free software distributed under the GPL version 2.
# See http://openslx.org/COPYING
#
# If you have any feedback please consult http://openslx.org/feedback and
# send your feedback to feedback@openslx.org
#
# General information about OpenSLX can be found at http://openslx.org
#
# Script is included from init via the "." load function - thus it has all
# variables and functions available

# Check if the plugin config directory is generally available or if the client
# configuration failed somehow
[ -d /initramfs/plugin-conf ] || error "${init_picfg}" nonfatal

# main script
if [ -e /initramfs/plugin-conf/pvs.conf ]; then
  . /initramfs/plugin-conf/pvs.conf
  if [ $pvs_active -ne 0 ]; then
    [ $DEBUGLEVEL -gt 0 ] && echo "executing the 'pvs' os-plugin ...";
    # configure central pvs client configuration file
    testmkdi /mnt/etc/pvs

    # add it to the Xserver script (?)

    # link the executables
    for tool in poolVS poolVSClient VNCwrapper ; do
      ln -s /opt/openslx/plugin-repo/pvs/${tool} /mnt/var/X11R6/bin/${tool}
    done

    # write config file
    echo "# parameters generated by $0" > /mnt/etc/pvs/pvs.conf
    echo "pvs_PARAMS=\"$PARAMS\"" >> /mnt/etc/pvs/pvs.conf
    echo "pvs_X11=\"$pvs_X11\"" >> /mnt/etc/pvs/pvs.conf

    [ $DEBUGLEVEL -gt 0 ] && echo "done with 'pvs' os-plugin ...";

    fi
  fi
else
  [ $DEBUGLEVEL -gt 2 ] && \
    echo "No configuration file found for pvs plugin."
fi