summaryrefslogtreecommitdiffstats
path: root/os-plugins
diff options
context:
space:
mode:
authorVolker Uhrig2008-09-14 18:34:48 +0200
committerVolker Uhrig2008-09-14 18:34:48 +0200
commita5429bbd7af607f64228239d3ff7179c9b74f8a9 (patch)
tree6d358fe6617459a046ca54c79af460397c64fc29 /os-plugins
parent * bug fixes to linkage (diff)
downloadcore-a5429bbd7af607f64228239d3ff7179c9b74f8a9.tar.gz
core-a5429bbd7af607f64228239d3ff7179c9b74f8a9.tar.xz
core-a5429bbd7af607f64228239d3ff7179c9b74f8a9.zip
* untested fix of #264
* now we have an stage3 option called vmchooser::env * s/<tab>/ / to fit our whitespace rule git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2218 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'os-plugins')
-rw-r--r--os-plugins/plugins/vmchooser/OpenSLX/OSPlugin/vmchooser.pm13
-rw-r--r--os-plugins/plugins/vmchooser/XX_vmchooser.sh4
-rwxr-xr-xos-plugins/plugins/vmchooser/files/xmlfilter.sh8
3 files changed, 18 insertions, 7 deletions
diff --git a/os-plugins/plugins/vmchooser/OpenSLX/OSPlugin/vmchooser.pm b/os-plugins/plugins/vmchooser/OpenSLX/OSPlugin/vmchooser.pm
index 8010dc24..512906f2 100644
--- a/os-plugins/plugins/vmchooser/OpenSLX/OSPlugin/vmchooser.pm
+++ b/os-plugins/plugins/vmchooser/OpenSLX/OSPlugin/vmchooser.pm
@@ -61,6 +61,17 @@ sub getAttrInfo
content_descr => '1 means active - 0 means inactive',
default => '1',
},
+ 'vmchooser::env' => {
+ applies_to_systems => 1,
+ applies_to_clients => 1,
+ description => unshiftHereDoc(<<' End-of-Here'),
+ environment, seperates pools based on XML configuration
+ End-of-Here
+ #TODO:
+ #content_regex => qr{^(0|1)$},
+ content_descr => 'name of environment',
+ default => 'default',
+ },
};
}
@@ -78,7 +89,7 @@ sub installationPhase
my $pluginBasePath = "$openslxBasePath/lib/plugins/$pluginName/files";
foreach my $file ( qw( vmchooser printer.sh scanner.sh xmlfilter.sh default.desktop ) ) {
copyFile("$pluginBasePath/$file", "$pluginRepoPath/");
- chmod 0755, "$pluginRepoPath/$file";
+ chmod 0755, "$pluginRepoPath/$file";
}
#copyFile("$pluginBasePath/default.desktop", "/usr/share/xsessions/");
diff --git a/os-plugins/plugins/vmchooser/XX_vmchooser.sh b/os-plugins/plugins/vmchooser/XX_vmchooser.sh
index bdce3429..1df3b275 100644
--- a/os-plugins/plugins/vmchooser/XX_vmchooser.sh
+++ b/os-plugins/plugins/vmchooser/XX_vmchooser.sh
@@ -17,12 +17,12 @@ CONFFILE="/initramfs/plugin-conf/vmchooser.conf"
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 ..."
+ [ $DEBUGLEVEL -gt 0 ] && echo "vmchooser: copying default .desktop file ..."
# we expect to have this directory to be interpreted by gdm/kdm
testmkd /mnt/etc/X11/sessions
cp /mnt/opt/openslx/plugin-repo/vmchooser/default.desktop \
/mnt/etc/X11/sessions/
+ cp $CONFFILE /mnt/opt/openslx/plugin-repo/vmchooser/stage3.conf
[ $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 3de6e562..2719557b 100755
--- a/os-plugins/plugins/vmchooser/files/xmlfilter.sh
+++ b/os-plugins/plugins/vmchooser/files/xmlfilter.sh
@@ -7,15 +7,15 @@
#
-if [ -f /etc/machine-setup ]; then
- . /etc/machine-setup
+if [ -f /opt/openslx/plugin-repo/vmchooser/stage3.conf ]; then
+ . /opt/openslx/plugin-repo/vmchooser/stage3.conf
fi
-if [ -n $slxgrp ]; then
+if [ -n ${env} ]; 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
+ if [ `grep "<pools param=\".*${env}.*\"" $FILE | wc -l` -eq 1 ]; then
echo $FILE;
fi
done