From 356c912b2bd07ac8b2d5ba93b6c9ea365bc53f1d Mon Sep 17 00:00:00 2001 From: Christian Rößler Date: Tue, 25 Mar 2014 16:51:54 +0100 Subject: [vbox] Added vmchooser-xml_filter --- .../data/opt/openslx/scripts/vmchooser-xml_filter | 74 ++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 remote/modules/vbox/data/opt/openslx/scripts/vmchooser-xml_filter (limited to 'remote/modules') diff --git a/remote/modules/vbox/data/opt/openslx/scripts/vmchooser-xml_filter b/remote/modules/vbox/data/opt/openslx/scripts/vmchooser-xml_filter new file mode 100644 index 00000000..c50b01a5 --- /dev/null +++ b/remote/modules/vbox/data/opt/openslx/scripts/vmchooser-xml_filter @@ -0,0 +1,74 @@ +#!/bin/bash +# Probably needs bash somewhere +# ----------------------------------------------------------------------------- +# Copyright (c) 2007..2009 - RZ Uni FR +# Copyright (c) 2007..2011 - OpenSLX GmbH +# +# This program 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 suggestions, praise, or complaints to feedback@openslx.org +# +# General information about OpenSLX can be found at http://openslx.org/ +# ----------------------------------------------------------------------------- +# xmlfilter.sh +# - This script is invoked by the vmchooser tool. It simply filters xml- +# files (taking the path to these files in $1). You might modify it in any +# way to match your needs, e.g. ask some database instead. You can re- +# implement it in any other programming language too. You simply have to +# return a list of proper xml files to be interpreted by the vmchooser +# binary). Please check for vmchooser.sh too ... +# ----------------------------------------------------------------------------- + +# This script . +# +# currently: +# - filter for slxgrp (which comes from /etc/machine-setup) +# + +# include default directories +. /opt/openslx/config + +if [ -f "${OPENSLX_DEFAULT_CONFDIR}/plugins/vmchooser/vmchooser.conf" ]; then + . "${OPENSLX_DEFAULT_CONFDIR}/plugins/vmchooser/vmchooser.conf" +fi + +function handlePersistentVM() { + if grep --extended-regexp -q "