summaryrefslogtreecommitdiffstats
path: root/os-plugins/plugins/vmchooser/files/xmlfilter.sh
diff options
context:
space:
mode:
authorMichael Janczyk2009-06-05 22:09:16 +0200
committerMichael Janczyk2009-06-05 22:09:16 +0200
commit04e1177387a454b471a39e4d497b8ba4af084121 (patch)
treef916f92e43bb2765b794a9331fc81ad88d4ff5a2 /os-plugins/plugins/vmchooser/files/xmlfilter.sh
parentVarious changes to xserver plugin: (diff)
downloadcore-04e1177387a454b471a39e4d497b8ba4af084121.tar.gz
core-04e1177387a454b471a39e4d497b8ba4af084121.tar.xz
core-04e1177387a454b471a39e4d497b8ba4af084121.zip
ubuntu 8.10+ and suse with kdm4 should work now
TODO: change default theme to openslx3 when using kdm3 git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2938 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'os-plugins/plugins/vmchooser/files/xmlfilter.sh')
-rwxr-xr-xos-plugins/plugins/vmchooser/files/xmlfilter.sh24
1 files changed, 13 insertions, 11 deletions
diff --git a/os-plugins/plugins/vmchooser/files/xmlfilter.sh b/os-plugins/plugins/vmchooser/files/xmlfilter.sh
index 7b3a3ac5..0a69ef7b 100755
--- a/os-plugins/plugins/vmchooser/files/xmlfilter.sh
+++ b/os-plugins/plugins/vmchooser/files/xmlfilter.sh
@@ -30,15 +30,17 @@ if [ -f /etc/opt/openslx/vmchooser-stage3.conf ]; then
. /etc/opt/openslx/vmchooser-stage3.conf
fi
-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};
+for FILE in $1/*.xml; do
+ # filter all xmls which aren't set active
+ if [ $(grep "<active param=.*true.*" ${FILE} | wc -l) -eq 1 ]; then
+ if [ -n ${vmchooser_env} ]; then
+ # filter all xmls with pool-param not equal to vmchooser::env
+ if [ $(grep "<pools param=\"${vmchooser_env}\"" ${FILE} | wc -l) -eq 1 ]; then
+ echo ${FILE};
+ fi
+ else
+ # if there is no pool set, just take all available xmls
+ echo -e ${active}
fi
- done
-else
- # if there is no pool set, just take all available xmls
- ls -1 $1/*.xml
-fi
+ fi
+done