From 416ab8a37f1b07dc9f6c0fb3ff1a8ff2036510b5 Mon Sep 17 00:00:00 2001 From: Sebastian Schmelzer Date: Thu, 2 Sep 2010 17:50:49 +0200 Subject: change dir structure --- .../plugins/vmchooser/files/xmlfilter.sh | 50 ++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100755 src/os-plugins/plugins/vmchooser/files/xmlfilter.sh (limited to 'src/os-plugins/plugins/vmchooser/files/xmlfilter.sh') diff --git a/src/os-plugins/plugins/vmchooser/files/xmlfilter.sh b/src/os-plugins/plugins/vmchooser/files/xmlfilter.sh new file mode 100755 index 00000000..5196992c --- /dev/null +++ b/src/os-plugins/plugins/vmchooser/files/xmlfilter.sh @@ -0,0 +1,50 @@ +#!/bin/bash +# ----------------------------------------------------------------------------- +# Copyright (c) 2007..2009 - RZ Uni FR +# Copyright (c) 2007..2009 - 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 +. /etc/opt/openslx/openslx.conf + +if [ -f ${OPENSLX_DEFAULT_CONFDIR}/plugins/vmchooser/vmchooser.conf ]; then + . ${OPENSLX_DEFAULT_CONFDIR}/plugins/vmchooser/vmchooser.conf +fi + +for FILE in $1/*.xml; do + # filter all xmls which aren't set active + if [ $(grep "