summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lib/OpenSLX/Utils.pm23
-rw-r--r--src/os-plugins/plugins/vmchooser/OpenSLX/OSPlugin/vmchooser.pm13
-rw-r--r--src/os-plugins/plugins/vmchooser/XX_vmchooser.sh16
-rw-r--r--src/os-plugins/plugins/vmchooser/files/themes/openslx/openslx-left.pngbin0 -> 9187 bytes
-rw-r--r--src/os-plugins/plugins/vmchooser/files/themes/openslx/openslx-right.pngbin0 -> 3390 bytes
-rw-r--r--src/os-plugins/plugins/vmchooser/files/themes/openslx/openslx.ini4
-rw-r--r--src/os-plugins/plugins/vmchooser/files/themes/unifr/title_l.pngbin0 -> 17458 bytes
-rw-r--r--src/os-plugins/plugins/vmchooser/files/themes/unifr/title_r.pngbin0 -> 4113 bytes
-rw-r--r--src/os-plugins/plugins/vmchooser/files/themes/unifr/unifr.ini4
-rwxr-xr-x[-rw-r--r--]src/os-plugins/plugins/vmchooser/files/vmchooserbin1530562 -> 1534964 bytes
10 files changed, 60 insertions, 0 deletions
diff --git a/src/lib/OpenSLX/Utils.pm b/src/lib/OpenSLX/Utils.pm
index 6e722c00..c6d94842 100644
--- a/src/lib/OpenSLX/Utils.pm
+++ b/src/lib/OpenSLX/Utils.pm
@@ -24,6 +24,7 @@ $VERSION = 1.01;
@EXPORT = qw(
copyFile fakeFile linkFile
+ copyDir
copyBinaryWithRequiredLibs
slurpFile spitFile appendFile
followLink
@@ -95,6 +96,28 @@ sub copyFile
return;
}
+
+sub copyDir
+{
+ my $dirName = shift || croak 'need to pass in a fileName!';
+ my $targetBase = shift || croak 'need to pass in target dir!';
+ my $targetDirName = shift || '';
+
+ mkpath($targetBase) unless -d $targetBase;
+ my $target = "$targetBase/$targetDirName";
+ vlog(2, _tr("copying '%s' to '%s'", $dirName, $target));
+ if (system("cp -pr $dirName $target")) {
+ croak(
+ _tr(
+ "unable to copy file '%s' to dir '%s' (%s)",
+ $dirName, $target, $!
+ )
+ );
+ }
+ return;
+}
+
+
=item B<fakeFile($fullPath)>
Creates the (empty) file I<$fullPath> unless it already exists.
diff --git a/src/os-plugins/plugins/vmchooser/OpenSLX/OSPlugin/vmchooser.pm b/src/os-plugins/plugins/vmchooser/OpenSLX/OSPlugin/vmchooser.pm
index 134ead6d..f3428e1a 100644
--- a/src/os-plugins/plugins/vmchooser/OpenSLX/OSPlugin/vmchooser.pm
+++ b/src/os-plugins/plugins/vmchooser/OpenSLX/OSPlugin/vmchooser.pm
@@ -76,6 +76,17 @@ sub getAttrInfo
content_descr => '1 means active - 0 means inactive',
default => '0',
},
+ 'vmchooser::theme' => {
+ applies_to_systems => 1,
+ applies_to_clients => 1,
+ description => unshiftHereDoc(<<' End-of-Here'),
+ theme for vmchooser
+ End-of-Here
+ #TODO:
+ #content_regex => qr{^(0|1)$},
+ content_descr => 'name of theme',
+ default => 'default',
+ },
'vmchooser::env' => {
applies_to_systems => 1,
applies_to_clients => 1,
@@ -118,6 +129,8 @@ sub installationPhase
copyFile("$pluginBasePath/$file", "$pluginRepoPath/");
chmod 0755, "$pluginRepoPath/$file";
}
+
+ copyDir("$pluginBasePath/themes", "$pluginRepoPath/");
# set ditro-specific default session
$self->{distro}->copyDefaultSession($pluginRepoPath);
diff --git a/src/os-plugins/plugins/vmchooser/XX_vmchooser.sh b/src/os-plugins/plugins/vmchooser/XX_vmchooser.sh
index 71852896..4253c501 100644
--- a/src/os-plugins/plugins/vmchooser/XX_vmchooser.sh
+++ b/src/os-plugins/plugins/vmchooser/XX_vmchooser.sh
@@ -28,6 +28,22 @@ if [ -e $CONFFILE ]; then
&& echo "vmchooser: copying stage3 configuration file ..."
testmkd ${PLUGINCONFDIR}/loopimg
testmkd ${PLUGINCONFDIR}/fd-loop 1777
+
+ vmchooser_conf_dir=/mnt/etc/vmchooser
+ vmchooser_conf=${vmchooser_conf_dir}/vmchooser.conf
+
+ testmkd ${vmchooser_conf_dir}
+
+ [ ! -z $vmchooser_env ] && echo "pool=${vmchooser_env}" >> $vmchooser_conf
+ [ ! -z $vmchooser_themne ] && echo "theme=${vmchooser_theme}" >> $vmchooser_conf
+ [ ! -z $vmchooser_pvs ] && echo "pvs=${vmchooser_pvs}" >> $vmchooser_conf
+ [ ! -z $vmchooser_xmlpath ] && echo "path=${vmchooser_xmlpath}" >> $vmchooser_conf
+
+ vmchooser_theme_dir=/mnt/usr/local/share/vmchooser/themes
+ testmkd $vmchooser_theme_dir
+
+ cp -r ${PLUGINDIR}/themes/* $vmchooser_theme_dir
+
cp $CONFFILE ${PLUGINCONFDIR}/vmchooser.conf
ln -s ${PLUGINDIR}/run-virt.sh ${BINDIR}/run-virt.sh
ln -s ${PLUGINDIR}/vmchooser ${BINDIR}/vmchooser
diff --git a/src/os-plugins/plugins/vmchooser/files/themes/openslx/openslx-left.png b/src/os-plugins/plugins/vmchooser/files/themes/openslx/openslx-left.png
new file mode 100644
index 00000000..900dd867
--- /dev/null
+++ b/src/os-plugins/plugins/vmchooser/files/themes/openslx/openslx-left.png
Binary files differ
diff --git a/src/os-plugins/plugins/vmchooser/files/themes/openslx/openslx-right.png b/src/os-plugins/plugins/vmchooser/files/themes/openslx/openslx-right.png
new file mode 100644
index 00000000..8ca9347b
--- /dev/null
+++ b/src/os-plugins/plugins/vmchooser/files/themes/openslx/openslx-right.png
Binary files differ
diff --git a/src/os-plugins/plugins/vmchooser/files/themes/openslx/openslx.ini b/src/os-plugins/plugins/vmchooser/files/themes/openslx/openslx.ini
new file mode 100644
index 00000000..57a22821
--- /dev/null
+++ b/src/os-plugins/plugins/vmchooser/files/themes/openslx/openslx.ini
@@ -0,0 +1,4 @@
+background-color=#ffffff
+image-right=openslx-right.png
+image-left=openslx-left.png
+
diff --git a/src/os-plugins/plugins/vmchooser/files/themes/unifr/title_l.png b/src/os-plugins/plugins/vmchooser/files/themes/unifr/title_l.png
new file mode 100644
index 00000000..e602ccd1
--- /dev/null
+++ b/src/os-plugins/plugins/vmchooser/files/themes/unifr/title_l.png
Binary files differ
diff --git a/src/os-plugins/plugins/vmchooser/files/themes/unifr/title_r.png b/src/os-plugins/plugins/vmchooser/files/themes/unifr/title_r.png
new file mode 100644
index 00000000..3edbcb0c
--- /dev/null
+++ b/src/os-plugins/plugins/vmchooser/files/themes/unifr/title_r.png
Binary files differ
diff --git a/src/os-plugins/plugins/vmchooser/files/themes/unifr/unifr.ini b/src/os-plugins/plugins/vmchooser/files/themes/unifr/unifr.ini
new file mode 100644
index 00000000..dadcb4e1
--- /dev/null
+++ b/src/os-plugins/plugins/vmchooser/files/themes/unifr/unifr.ini
@@ -0,0 +1,4 @@
+background-color=#003592
+image-right=title_r.png
+image-left=title_l.png
+
diff --git a/src/os-plugins/plugins/vmchooser/files/vmchooser b/src/os-plugins/plugins/vmchooser/files/vmchooser
index 745cdb71..5b341900 100644..100755
--- a/src/os-plugins/plugins/vmchooser/files/vmchooser
+++ b/src/os-plugins/plugins/vmchooser/files/vmchooser
Binary files differ