diff options
author | Dirk von Suchodoletz | 2008-12-22 23:32:05 +0100 |
---|---|---|
committer | Dirk von Suchodoletz | 2008-12-22 23:32:05 +0100 |
commit | 2acc8944922161d5891df49430638f4a3050df0b (patch) | |
tree | a520ec33a23c3ae86b3d44e2593a00b0a918446d /os-plugins/plugins | |
parent | Adding the feature to add serial ports to a VMware/Player configuration (diff) | |
download | core-2acc8944922161d5891df49430638f4a3050df0b.tar.gz core-2acc8944922161d5891df49430638f4a3050df0b.tar.xz core-2acc8944922161d5891df49430638f4a3050df0b.zip |
Just explained the use of the filter script: It allows to dynamically
display lists of vm sessions depending on the user just logged in, date,
time, ... (if re-scripted appropriately)
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2450 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'os-plugins/plugins')
-rwxr-xr-x | os-plugins/plugins/vmchooser/files/xmlfilter.sh | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/os-plugins/plugins/vmchooser/files/xmlfilter.sh b/os-plugins/plugins/vmchooser/files/xmlfilter.sh index 4e056482..92c5807e 100755 --- a/os-plugins/plugins/vmchooser/files/xmlfilter.sh +++ b/os-plugins/plugins/vmchooser/files/xmlfilter.sh @@ -1,12 +1,15 @@ #!/bin/bash +# Copyright (c) 2008 - Rechenzentrum Uni Freiburg, OpenSLX GmbH # -# This script is a filter for the xml-files available -# -# currently: +# This script 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). +# +# currently: # - filter for slxgrp (which comes from /etc/machine-setup) # - if [ -f /etc/opt/openslx/vmchooser-stage3.conf ]; then . /etc/opt/openslx/vmchooser-stage3.conf fi @@ -15,8 +18,8 @@ if [ -n ${vmchooser_env} ]; then for FILE in $1/*.xml do # filter all xmls with pool-param not equal to slxgroup - if [ `grep "<pools param=\".*${vmchooser_env}.*\"" $FILE | wc -l` -eq 1 ]; then - echo $FILE; + if [ $(grep "<pools param=\".*${vmchooser_env}.*\"" ${FILE} | wc -l) -eq 1 ]; then + echo ${FILE}; fi done else |