summaryrefslogtreecommitdiffstats
path: root/os-plugins/plugins/desktop/OpenSLX/Distro/Base.pm
diff options
context:
space:
mode:
authorOliver Tappe2008-05-18 14:55:19 +0200
committerOliver Tappe2008-05-18 14:55:19 +0200
commit121f6854524af595578a949b7f86ad5434f286c0 (patch)
treee06c31114cdbbbbac7d6f0ed386a4fe6c5819776 /os-plugins/plugins/desktop/OpenSLX/Distro/Base.pm
parent* delete the respective plugin-repo subfolder upon removal of a specific plugin (diff)
downloadcore-121f6854524af595578a949b7f86ad5434f286c0.tar.gz
core-121f6854524af595578a949b7f86ad5434f286c0.tar.xz
core-121f6854524af595578a949b7f86ad5434f286c0.zip
* intermediate commit of desktop plugin, preparing for travel ...
* copied displaymanager themes into desktop plugin (original files will be removed once the desktop plugin is working) git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@1775 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'os-plugins/plugins/desktop/OpenSLX/Distro/Base.pm')
-rw-r--r--os-plugins/plugins/desktop/OpenSLX/Distro/Base.pm38
1 files changed, 34 insertions, 4 deletions
diff --git a/os-plugins/plugins/desktop/OpenSLX/Distro/Base.pm b/os-plugins/plugins/desktop/OpenSLX/Distro/Base.pm
index 80be8bcf..b9bf5f03 100644
--- a/os-plugins/plugins/desktop/OpenSLX/Distro/Base.pm
+++ b/os-plugins/plugins/desktop/OpenSLX/Distro/Base.pm
@@ -18,6 +18,8 @@ use warnings;
our $VERSION = 1.01; # API-version . implementation-version
+use File::Basename;
+
use OpenSLX::Basics;
use OpenSLX::Utils;
@@ -106,12 +108,40 @@ sub GDMPathInfo
return $pathInfo;
}
-sub patchGDMScript
+sub setupGDMScript
{
- my $self = shift;
- my $script = shift;
+ my $self = shift;
+ my $repoPath = shift;
+
+ my $pathInfo = $self->GDMPathInfo();
+ my $configFile = $pathInfo->{config};
- # default implementation does nothing!
+ my $paths
+ = join(
+ ' ',
+ map { '/mnt' . $_ } ( dirname($configFile), @{$pathInfo->{paths}} )
+ );
+ my $script = unshiftHereDoc(<<" End-of-Here");
+ #!/bin/ash
+ # written by OpenSLX-plugin 'desktop'
+
+ mkdir -p $paths 2>/dev/null
+
+ cp /mnt/$repoPath/gdm/\$desktop_mode/gdm.conf /mnt$configFile
+
+ # activate theme only if the corresponding xml file is found
+ # (otherwise fall back to default theme of vendor-OS)
+ if [ -n "\$desktop_theme" ]; then
+ thdir=/opt/openslx/plugin-repo/desktop/themes/openslx/gdm
+ theme=\$desktop_theme
+ if [ -e /mnt\$thdir/\$theme/\$theme.xml ]; then
+ sed -i "s,\\[greeter\\],[greeter]\\nGraphicalThemeDir=\$thdir," \\
+ /mnt$configFile
+ sed -i "s,\\[greeter\\],[greeter]\\nGraphicalTheme=\$theme," \\
+ /mnt$configFile
+ fi
+ fi
+ End-of-Here
return $script;
}