summaryrefslogtreecommitdiffstats
path: root/os-plugins/plugins/vmchooser
diff options
context:
space:
mode:
Diffstat (limited to 'os-plugins/plugins/vmchooser')
-rw-r--r--os-plugins/plugins/vmchooser/OpenSLX/OSPlugin/vmchooser.pm3
-rw-r--r--os-plugins/plugins/vmchooser/XX_vmchooser.sh2
-rwxr-xr-xos-plugins/plugins/vmchooser/files/xmlfilter.sh24
3 files changed, 27 insertions, 2 deletions
diff --git a/os-plugins/plugins/vmchooser/OpenSLX/OSPlugin/vmchooser.pm b/os-plugins/plugins/vmchooser/OpenSLX/OSPlugin/vmchooser.pm
index c178700f..0ba9c17a 100644
--- a/os-plugins/plugins/vmchooser/OpenSLX/OSPlugin/vmchooser.pm
+++ b/os-plugins/plugins/vmchooser/OpenSLX/OSPlugin/vmchooser.pm
@@ -79,7 +79,8 @@ sub installationPhase
copyFile("$pluginBasePath/$file", "$pluginRepoPath/");
chmod 0755, "$pluginRepoPath/$file";
}
- copyFile("$pluginBasePath/default.desktop", "/usr/share/xsessions/");
+
+ #copyFile("$pluginBasePath/default.desktop", "/usr/share/xsessions/");
return;
}
diff --git a/os-plugins/plugins/vmchooser/XX_vmchooser.sh b/os-plugins/plugins/vmchooser/XX_vmchooser.sh
index a1a81c86..e7ec637c 100644
--- a/os-plugins/plugins/vmchooser/XX_vmchooser.sh
+++ b/os-plugins/plugins/vmchooser/XX_vmchooser.sh
@@ -5,6 +5,8 @@ if [ -e $CONFFILE ]; then
. $CONFFILE
if [ $vmchooser_active -ne 0 ]; then
[ $DEBUGLEVEL -gt 0 ] && echo "executing the 'vmchooser' os-plugin ...";
+ [ $DEBUGLEVEL -gt 0 ] && echo "copying default .desktop file ...";
+ cp /opt/openslx/plugin-repo/vmchooser/default.desktop /etc/X11/sessions/
[ $DEBUGLEVEL -gt 0 ] && echo "done with 'vmchooser' os-plugin ...";
fi
fi
diff --git a/os-plugins/plugins/vmchooser/files/xmlfilter.sh b/os-plugins/plugins/vmchooser/files/xmlfilter.sh
index 1d3e67c3..3de6e562 100755
--- a/os-plugins/plugins/vmchooser/files/xmlfilter.sh
+++ b/os-plugins/plugins/vmchooser/files/xmlfilter.sh
@@ -1,3 +1,25 @@
#!/bin/bash
+#
+# This script is a filter for the xml-files available
+#
+# currently:
+# - filter for slxgrp (which comes from /etc/machine-setup)
+#
-ls -1 /var/lib/vmware/*.xml
+
+if [ -f /etc/machine-setup ]; then
+ . /etc/machine-setup
+fi
+
+if [ -n $slxgrp ]; then
+ for FILE in $1/*.xml
+ do
+ # filter all xmls with pool-param not equal to slxgroup
+ if [ `grep "<pools param=\".*$slxgrp.*\"" $FILE | wc -l` -eq 1 ]; then
+ echo $FILE;
+ fi
+ done
+else
+ # if there is no pool set, just take all available xmls
+ ls -1 $1/*.xml
+fi