summaryrefslogtreecommitdiffstats
path: root/os-plugins/plugins
diff options
context:
space:
mode:
authorOliver Tappe2008-03-17 23:32:36 +0100
committerOliver Tappe2008-03-17 23:32:36 +0100
commit1d731c53b5aa248b0ae0fb3b217659f229c7e632 (patch)
tree834255d53fa9181e68175cd82115bc966863eccd /os-plugins/plugins
parent* removed debug output (diff)
downloadcore-1d731c53b5aa248b0ae0fb3b217659f229c7e632.tar.gz
core-1d731c53b5aa248b0ae0fb3b217659f229c7e632.tar.xz
core-1d731c53b5aa248b0ae0fb3b217659f229c7e632.zip
* Heavily worked at OSPlugin::Engine and 'desktop'-plugin. Support for stage1
attributes and most of the desktop framework is implemented. Although we have made good progress, we are not quite there yet, i.e. the desktop plugin gets the correct attributes into stage3, but it still does not work: kdm gets started although gdm should be run. git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@1650 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'os-plugins/plugins')
-rw-r--r--os-plugins/plugins/desktop/OpenSLX/Distro/Base.pm (renamed from os-plugins/plugins/desktop/OpenSLX/Distro/base.pm)94
-rw-r--r--os-plugins/plugins/desktop/OpenSLX/Distro/debian.pm97
-rw-r--r--os-plugins/plugins/desktop/OpenSLX/Distro/suse.pm5
-rw-r--r--os-plugins/plugins/desktop/OpenSLX/Distro/ubuntu.pm76
-rw-r--r--os-plugins/plugins/desktop/OpenSLX/OSPlugin/desktop.pm137
-rw-r--r--os-plugins/plugins/desktop/XX_desktop.sh50
6 files changed, 215 insertions, 244 deletions
diff --git a/os-plugins/plugins/desktop/OpenSLX/Distro/base.pm b/os-plugins/plugins/desktop/OpenSLX/Distro/Base.pm
index b8c7bd8a..37cfff46 100644
--- a/os-plugins/plugins/desktop/OpenSLX/Distro/base.pm
+++ b/os-plugins/plugins/desktop/OpenSLX/Distro/Base.pm
@@ -12,7 +12,7 @@
# - provides empty base of the OpenSLX OSPlugin Distro API for the desktop
# plugin.
# -----------------------------------------------------------------------------
-package OpenSLX::Distro::base;
+package OpenSLX::Distro::Base;
use strict;
use warnings;
@@ -27,13 +27,15 @@ use OpenSLX::Utils;
################################################################################
sub new
{
- confess "Creating OpenSLX::OSPlugin::Distro::Base-objects directly makes no sense!";
+ my $class = shift;
+ my $self = {};
+ return bless $self, $class;
}
sub initialize
{
- my $self = shift;
- my $engine = shift;
+ my $self = shift;
+ $self->{engine} = shift;
return 1;
}
@@ -44,36 +46,42 @@ sub isInPath
my $binary = shift;
my $path = qx{which $binary 2>/dev/null};
-
+
return $path ? 1 : 0;
}
-sub isKDEInstalled
+sub isGNOMEInstalled
{
my $self = shift;
-
- return $self->isInPath('startkde');
+
+ return $self->isInPath('gnome-session');
}
-sub isKDMInstalled
+sub isGDMInstalled
{
my $self = shift;
- return $self->isInPath('kdm');
+ return $self->isInPath('gdm');
}
-sub isGNOMEInstalled
+sub installGNOME
{
my $self = shift;
- return $self->isInPath('gnome-session');
+ $self->{engine}->installPackages(
+ $self->{engine}->getInstallablePackagesForSelection('gnome')
+ );
+
+ return 1;
}
-sub isGDMInstalled
+sub installGDM
{
my $self = shift;
- return $self->isInPath('gdm');
+ $self->{engine}->installPackages('gdm');
+
+ return 1;
}
sub GDMPathInfo
@@ -151,13 +159,45 @@ sub GDMConfigHashForChooser
return $configHash;
}
+sub isKDEInstalled
+{
+ my $self = shift;
+
+ return $self->isInPath('startkde');
+}
+
+sub isKDMInstalled
+{
+ my $self = shift;
+
+ return $self->isInPath('kdm');
+}
+
+sub installKDE
+{
+ my $self = shift;
+
+ $self->{engine}->installPackages(
+ $self->{engine}->getInstallablePackagesForSelection('kde')
+ );
+
+ return 1;
+}
+
+sub installKDM
+{
+ my $self = shift;
+
+ $self->{engine}->installPackages('kdm');
+
+ return 1;
+}
+
sub isXFCEInstalled
{
my $self = shift;
- # TODO: implement this!
- warn "someone please implement this!";
- return 0;
+ return $self->isInPath('startxfce4');
}
sub isXDMInstalled
@@ -167,4 +207,24 @@ sub isXDMInstalled
return $self->isInPath('xdm');
}
+sub installXFCE
+{
+ my $self = shift;
+
+ $self->{engine}->installPackages(
+ $self->{engine}->getInstallablePackagesForSelection('xfce')
+ );
+
+ return 1;
+}
+
+sub installXDM
+{
+ my $self = shift;
+
+ $self->{engine}->installPackages('xdm');
+
+ return 1;
+}
+
1;
diff --git a/os-plugins/plugins/desktop/OpenSLX/Distro/debian.pm b/os-plugins/plugins/desktop/OpenSLX/Distro/debian.pm
index a514f10f..c5e6c5cd 100644
--- a/os-plugins/plugins/desktop/OpenSLX/Distro/debian.pm
+++ b/os-plugins/plugins/desktop/OpenSLX/Distro/debian.pm
@@ -8,15 +8,16 @@
#
# General information about OpenSLX can be found at http://openslx.org/
# -----------------------------------------------------------------------------
-# Debian.pm
-# - provides Debian-specific overrides of the OpenSLX OSSetup API.
+# debian.pm
+# - provides Debian-specific overrides of the OpenSLX Distro API for the
+# desktop plugin.
# -----------------------------------------------------------------------------
-package OpenSLX::OSSetup::Distro::Debian;
+package OpenSLX::Distro::debian;
use strict;
use warnings;
-use base qw(OpenSLX::OSSetup::Distro::Base);
+use base qw(OpenSLX::Distro::Base);
use OpenSLX::Basics;
use OpenSLX::Utils;
@@ -24,93 +25,5 @@ use OpenSLX::Utils;
################################################################################
### interface methods
################################################################################
-sub new
-{
- my $class = shift;
- my $self = {};
- return bless $self, $class;
-}
-sub initialize
-{
- my $self = shift;
- my $engine = shift;
-
- $self->SUPER::initialize($engine);
- $self->{'packager-type'} = 'dpkg';
- $self->{'meta-packager-type'} = $ENV{SLX_META_PACKAGER} || 'apt';
- $self->{'stage1c-faked-files'} = [];
- return;
-}
-
-sub preSystemInstallationHook
-{
- my $self = shift;
-
- $self->SUPER::preSystemInstallationHook();
-
- # fake required /dev-entries
- my %devInfo = (
- mem => { type => 'c', major => '1', minor => '1' },
- null => { type => 'c', major => '1', minor => '3' },
- zero => { type => 'c', major => '1', minor => '5' },
- random => { type => 'c', major => '1', minor => '8' },
- urandom => { type => 'c', major => '1', minor => '9' },
- kmsg => { type => 'c', major => '1', minor => '11' },
- console => { type => 'c', major => '5', minor => '1' },
- ptmx => { type => 'c', major => '5', minor => '2' },
- );
- foreach my $dev (keys %devInfo) {
- my $info = $devInfo{$dev};
- if (!-e "/dev/$dev") {
- if (slxsystem(
- "mknod /dev/$dev $info->{type} $info->{major} $info->{minor}"
- )) {
- croak(_tr("unable to create dev-node '%s'! (%s)", $dev, $!));
- }
- }
- }
- foreach my $devDir ('pts', 'shm', '.udevdb', '.udev') {
- if (!-e "/dev/$devDir") {
- if (slxsystem("mkdir -p /dev/$devDir")) {
- croak(_tr("unable to create dev-dir '%s'! (%s)", $devDir, $!));
- }
- }
- }
-
- # replace /usr/sbin/invoke-rc.d by a dummy, in order to avoid a whole lot
- # of initscripts being started. Wishful thinking: there should be another
- # way to stop Debian from doing this, as this is not really very supportive
- # of folder-based installations (then again: I may simply be too stupid
- # to find out how it is supposed to work ...)
- rename('/usr/sbin/invoke-rc.d', '/usr/sbin/_invoke-rc.d');
- spitFile('/usr/sbin/invoke-rc.d', "#! /bin/sh\nexit 0\n");
- chmod 0755, '/usr/sbin/invoke-rc.d';
-}
-
-sub postSystemInstallationHook
-{
- my $self = shift;
-
- # restore /usr/sbin/invoke-rc.d
- rename('/usr/sbin/_invoke-rc.d', '/usr/sbin/invoke-rc.d');
- $self->SUPER::postSystemInstallationHook();
-}
-
-sub setPasswordForUser
-{
- my $self = shift;
- my $username = shift;
- my $password = shift;
-
- # activate shadow passwords
- my $activateShadowFunction = sub {
- slxsystem('/sbin/shadowconfig', 'on');
- };
- $self->{engine}->callChrootedFunctionForVendorOS($activateShadowFunction);
-
- # invoke default behaviour
- $self->SUPER::setPasswordForUser($username, $password);
-}
-
1; \ No newline at end of file
diff --git a/os-plugins/plugins/desktop/OpenSLX/Distro/suse.pm b/os-plugins/plugins/desktop/OpenSLX/Distro/suse.pm
index 34363460..761a3705 100644
--- a/os-plugins/plugins/desktop/OpenSLX/Distro/suse.pm
+++ b/os-plugins/plugins/desktop/OpenSLX/Distro/suse.pm
@@ -9,14 +9,15 @@
# General information about OpenSLX can be found at http://openslx.org/
# -----------------------------------------------------------------------------
# SUSE.pm
-# - provides SUSE-specific overrides of the OpenSLX OSSetup API.
+# - provides SUSE-specific overrides of the OpenSLX Distro API for the desktop
+# plugin.
# -----------------------------------------------------------------------------
package OpenSLX::Distro::suse;
use strict;
use warnings;
-use base qw(OpenSLX::Distro::base);
+use base qw(OpenSLX::Distro::Base);
use OpenSLX::Basics;
diff --git a/os-plugins/plugins/desktop/OpenSLX/Distro/ubuntu.pm b/os-plugins/plugins/desktop/OpenSLX/Distro/ubuntu.pm
index 4ab5abbc..9982d363 100644
--- a/os-plugins/plugins/desktop/OpenSLX/Distro/ubuntu.pm
+++ b/os-plugins/plugins/desktop/OpenSLX/Distro/ubuntu.pm
@@ -11,12 +11,12 @@
# Ubuntu.pm
# - provides Ubuntu-specific overrides of the OpenSLX OSSetup API.
# -----------------------------------------------------------------------------
-package OpenSLX::OSSetup::Distro::Ubuntu;
+package OpenSLX::Distro::ubuntu;
use strict;
use warnings;
-use base qw(OpenSLX::OSSetup::Distro::Base);
+use base qw(OpenSLX::Distro::Base);
use OpenSLX::Basics;
use OpenSLX::Utils;
@@ -24,77 +24,5 @@ use OpenSLX::Utils;
################################################################################
### interface methods
################################################################################
-sub new
-{
- my $class = shift;
- my $self = {};
- return bless $self, $class;
-}
-
-sub initialize
-{
- my $self = shift;
- my $engine = shift;
-
- $self->SUPER::initialize($engine);
- $self->{'packager-type'} = 'dpkg';
- $self->{'meta-packager-type'} = $ENV{SLX_META_PACKAGER} || 'apt';
- $self->{'stage1c-faked-files'} = [];
- return;
-}
-
-sub preSystemInstallationHook
-{
- my $self = shift;
-
- $self->SUPER::preSystemInstallationHook();
-
- # fake required /dev-entries
- my %devInfo = (
- mem => { type => 'c', major => '1', minor => '1' },
- null => { type => 'c', major => '1', minor => '3' },
- zero => { type => 'c', major => '1', minor => '5' },
- random => { type => 'c', major => '1', minor => '8' },
- urandom => { type => 'c', major => '1', minor => '9' },
- kmsg => { type => 'c', major => '1', minor => '11' },
- console => { type => 'c', major => '5', minor => '1' },
- ptmx => { type => 'c', major => '5', minor => '2' },
- );
- foreach my $dev (keys %devInfo) {
- my $info = $devInfo{$dev};
- if (!-e "/dev/$dev") {
- if (slxsystem(
- "mknod /dev/$dev $info->{type} $info->{major} $info->{minor}"
- )) {
- croak(_tr("unable to create dev-node '%s'! (%s)", $dev, $!));
- }
- }
- }
- foreach my $devDir ('pts', 'shm', '.udevdb', '.udev') {
- if (!-e "/dev/$devDir") {
- if (slxsystem("mkdir -p /dev/$devDir")) {
- croak(_tr("unable to create dev-dir '%s'! (%s)", $devDir, $!));
- }
- }
- }
-
- # replace /usr/sbin/invoke-rc.d by a dummy, in order to avoid a whole lot
- # of initscripts being started. Wishful thinking: there should be another
- # way to stop Ubuntu from doing this, as this is not really very supportive
- # of folder-based installations (then again: I may simply be too stupid
- # to find out how it is supposed to work ...)
- rename('/usr/sbin/invoke-rc.d', '/usr/sbin/_invoke-rc.d');
- spitFile('/usr/sbin/invoke-rc.d', "#! /bin/sh\nexit 0\n");
- chmod 0755, '/usr/sbin/invoke-rc.d';
-}
-
-sub postSystemInstallationHook
-{
- my $self = shift;
-
- # restore /usr/sbin/invoke-rc.d
- rename('/usr/sbin/_invoke-rc.d', '/usr/sbin/invoke-rc.d');
- $self->SUPER::postSystemInstallationHook();
-}
1; \ No newline at end of file
diff --git a/os-plugins/plugins/desktop/OpenSLX/OSPlugin/desktop.pm b/os-plugins/plugins/desktop/OpenSLX/OSPlugin/desktop.pm
index a0dc589c..2f3ffafd 100644
--- a/os-plugins/plugins/desktop/OpenSLX/OSPlugin/desktop.pm
+++ b/os-plugins/plugins/desktop/OpenSLX/OSPlugin/desktop.pm
@@ -176,15 +176,15 @@ sub getDefaultAttrsForVendorOS
my $attrs = $self->getAttrInfo();
- if ($vendorOSName =~ m{kde$}) {
+ if ($vendorOSName =~ m{kde}) {
$attrs->{'desktop::manager'}->{default} = 'kdm';
$attrs->{'desktop::kind'}->{default} = 'kde';
}
- elsif ($vendorOSName =~ m{gnome$}) {
+ elsif ($vendorOSName =~ m{gnome}) {
$attrs->{'desktop::manager'}->{default} = 'gdm';
$attrs->{'desktop::kind'}->{default} = 'gnome';
}
- elsif ($vendorOSName =~ m{xfce$}) {
+ elsif ($vendorOSName =~ m{xfce}) {
$attrs->{'desktop::manager'}->{default} = 'xdm';
$attrs->{'desktop::kind'}->{default} = 'xcfe';
}
@@ -203,18 +203,35 @@ sub installationPhase
$self->{openslxPath} = shift;
$self->{attrs} = shift;
+ # We are going to change some of the stage1 attributes during installation
+ # (basically we are filling the ones that are not defined). Since the result
+ # of these changes might change between invocations, we do not want to store
+ # the resulting values, but we want to store the original (undef).
+ # In order to do so, we copy all stage1 attributes directly into the
+ # object hash and change them there.
+ $self->{gdm} = $self->{attrs}->{'desktop::gdm'};
+ $self->{kdm} = $self->{attrs}->{'desktop::kdm'};
+ $self->{xdm} = $self->{attrs}->{'desktop::xdm'};
+ $self->{gnome} = $self->{attrs}->{'desktop::gnome'};
+ $self->{kde} = $self->{attrs}->{'desktop::kde'};
+ $self->{xcfe} = $self->{attrs}->{'desktop::xfce'};
+
+use Data::Dumper; print Dumper $self->{attrs};
+
$self->_installRequiredPackages();
- $self->_determineAttrsByInstalledPackages();
+ $self->_fillUnsetStage1Attrs();
+ $self->_ensureSensibleStage3Attrs();
use Data::Dumper; print Dumper $self->{attrs};
- if ($self->{attrs}->{'desktop::gdm'}) {
+ # start to actually do something - according to current stage1 attributes
+ if ($self->{gdm}) {
$self->_setupGDM();
}
- if ($self->{attrs}->{'desktop::kdm'}) {
+ if ($self->{kdm}) {
$self->_setupKDM();
}
- if ($self->{attrs}->{'desktop::xdm'}) {
+ if ($self->{xdm}) {
$self->_setupXDM();
}
@@ -280,42 +297,82 @@ sub _installRequiredPackages
my $engine = $self->{'os-plugin-engine'};
- for my $desktop (qw( gnome kde xfce )) {
- next if !$self->{attrs}->{"desktop::$desktop"};
- my $packages = $engine->getPackagesForSelection($desktop);
- $engine->installPackages($packages);
+ if ($self->{'gnome'} && !$self->{distro}->isGNOMEInstalled()) {
+ $self->{distro}->installGNOME();
}
-
- for my $dm (qw( gdm kdm xdm )) {
- next if !$self->{attrs}->{"desktop::$dm"};
- $engine->installPackages($dm);
+ if ($self->{'gdm'} && !$self->{distro}->isGDMInstalled()) {
+ $self->{distro}->installGDM();
+ }
+ if ($self->{'kde'} && !$self->{distro}->isKDEInstalled()) {
+ $self->{distro}->installKDE();
+ }
+ if ($self->{'kdm'} && !$self->{distro}->isKDMInstalled()) {
+ $self->{distro}->installKDM();
+ }
+ if ($self->{'xfce'} && !$self->{distro}->isXFCEInstalled()) {
+ $self->{distro}->installXFCE();
+ }
+ if ($self->{'xdm'} && !$self->{distro}->isXDMInstalled()) {
+ $self->{distro}->installXDM();
}
return 1;
}
-sub _determineAttrsByInstalledPackages
+sub _fillUnsetStage1Attrs
{
- my $self = shift;
- my $attrs = shift;
-
- if (!defined $attrs->{'desktop::gnome'}) {
- $attrs->{'desktop::gnome'} = $self->{distro}->isGNOMEInstalled();
+ my $self = shift;
+
+ if (!defined $self->{'gnome'}) {
+ $self->{'gnome'} = $self->{distro}->isGNOMEInstalled();
+ }
+ if (!defined $self->{'gdm'}) {
+ $self->{'gdm'} = $self->{distro}->isGDMInstalled();
}
- if (!defined $attrs->{'desktop::gdm'}) {
- $attrs->{'desktop::gdm'} = $self->{distro}->isGDMInstalled();
+ if (!defined $self->{'kde'}) {
+ $self->{'kde'} = $self->{distro}->isKDEInstalled();
}
- if (!defined $attrs->{'desktop::kde'}) {
- $attrs->{'desktop::kde'} = $self->{distro}->isKDEInstalled();
+ if (!defined $self->{'kdm'}) {
+ $self->{'kdm'} = $self->{distro}->isKDMInstalled();
}
- if (!defined $attrs->{'desktop::kdm'}) {
- $attrs->{'desktop::kdm'} = $self->{distro}->isKDMInstalled();
+ if (!defined $self->{'xfce'}) {
+ $self->{'xfce'} = $self->{distro}->isXFCEInstalled();
}
- if (!defined $attrs->{'desktop::xfce'}) {
- $attrs->{'desktop::xfde'} = $self->{distro}->isXFCEInstalled();
+ if (!defined $self->{'xdm'}) {
+ $self->{'xdm'} = $self->{distro}->isXDMInstalled();
}
- if (!defined $attrs->{'desktop::xdm'}) {
- $attrs->{'desktop::xdm'} = $self->{distro}->isXDMInstalled();
+
+ return 1;
+}
+
+sub _ensureSensibleStage3Attrs
+{
+ my $self = shift;
+
+ # check if current desktop kind is enabled at all and select another
+ # one, if it isn't
+ my $kind = $self->{attrs}->{'desktop::kind'} || '';
+ if (!$self->{$kind}) {
+ my @desktops = map { $self->{$_} ? $_ : () } qw( gnome kde xfce );
+ if (!@desktops) {
+ die _tr(
+ "no desktop kind is possible, plugin 'desktop' wouldn't work!"
+ );
+ }
+ $self->{attrs}->{'desktop::kind'} = $desktops[0];
+ }
+
+ # check if current desktop manager is enabled at all and select another
+ # one, if it isn't
+ my $manager = $self->{attrs}->{'desktop::manager'} || '';
+ if (!$self->{$manager}) {
+ my @managers = map { $self->{$_} ? $_ : () } qw( gdm kdm xdm );
+ if (!@managers) {
+ die _tr(
+ "no desktop manager is possible, plugin 'desktop' wouldn't work!"
+ );
+ }
+ $self->{attrs}->{'desktop::manager'} = $managers[0];
}
return 1;
@@ -327,7 +384,11 @@ sub _setupGDM
my $attrs = shift;
my $repoPath = $self->{pluginRepositoryPath};
- mkpath([ "$repoPath/gdm" ]);
+ mkpath([
+ "$repoPath/gdm/workstation",
+ "$repoPath/gdm/kiosk",
+ "$repoPath/gdm/chooser",
+ ]);
my $pathInfo = $self->{distro}->GDMPathInfo();
$self->_setupGDMScript($pathInfo);
@@ -351,12 +412,17 @@ sub _setupGDMScript
my $repoPath = $self->{pluginRepositoryPath};
my $configFile = $pathInfo->{config};
- my $paths = join(' ', ( dirname($configFile), @{$pathInfo->{paths}} ));
+ 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
- ln -sf /mnt$repoPath/gdm/\$desktop_kind/gdm.conf $configFile
+ mkdir -p $paths 2>/dev/null
+ ln -sf $repoPath/gdm/\$desktop_mode/gdm.conf /mnt$configFile
+ rllinker gdm 1 15
End-of-Here
spitFile("$repoPath/gdm/desktop.sh", $script);
return;
@@ -391,6 +457,7 @@ sub _writeConfigHash
: '';
$content .= "$key=$value\n";
}
+ $content .= "\n";
}
spitFile($file, $content);
}
diff --git a/os-plugins/plugins/desktop/XX_desktop.sh b/os-plugins/plugins/desktop/XX_desktop.sh
index 0a4a3267..651c4044 100644
--- a/os-plugins/plugins/desktop/XX_desktop.sh
+++ b/os-plugins/plugins/desktop/XX_desktop.sh
@@ -1,34 +1,36 @@
-#! /bin/sh
+#! /bin/ash
#
-# stage3 part of 'displaymanager' plugin - the runlevel script
+# stage3 part of 'desktop' plugin - the runlevel script
#
. /etc/functions
. /etc/distro-functions
. /etc/sysconfig/config
-if [ -e /initramfs/plugin-conf/displaymanager.conf ]; then
- . /initramfs/plugin-conf/displaymanager.conf
- if [ $displaymanager_active -ne 0 ]; then
- [ $DEBUGLEVEL -gt 0 ] && echo "executing the 'displaymanager' os-plugin ...";
-
- testmkd /mnt/var/lib/openslx/themes
- testmkd /mnt/var/lib/openslx/config
+if [ -e /initramfs/plugin-conf/desktop.conf ]; then
+ . /initramfs/plugin-conf/desktop.conf
+ if [ $desktop_active -ne 0 ]; then
+ [ $DEBUGLEVEL -gt 0 ] && echo "executing the 'desktop' os-plugin ...";
+
+ testmkd /mnt/var/lib/openslx/themes
+ testmkd /mnt/var/lib/openslx/config
- if [ "${displaymanager_xdmcp}" = "gdm" ]; then
- cp /usr/share/config/gdm.conf /mnt/etc/gdm/gdm.conf
- cp -a /usr/share/themes/gdm /mnt/var/lib/openslx/themes
- sed -i "s,GraphicalThemeDir=.*,GraphicalThemeDir=/var/lib/openslx/themes," \
- /mnt/etc/gdm/gdm.conf
- sed -i "s,GraphicalTheme=.*GraphicalTheme=gdm," /mnt/etc/gdm/gdm.conf
- fi
+ . /mnt/opt/openslx/plugin-repo/desktop/${desktop_manager}/desktop.sh
- if [ "${displaymanager_xdmcp}" = "kdm" ]; then
- cp /usr/share/config/kdmrc /mnt/etc/kde3/kdm/kdmrc
- cp -a /usr/share/themes/kdm /mnt/var/lib/openslx/themes
- sed -i "s,Theme=.*,Theme=/var/lib/openslx/themes/kdm," /mnt/etc/kde3/kdm/kdmrc
- sed -i "s,UseTheme=.*,UseTheme=true," /mnt/etc/kde3/kdm/kdmrc
- fi
+ # TODO: move the following stuff into the gdm-specific desktop.sh
+ # (and perhaps handle through a template?)
+ if [ "${desktop_manager}" = "XXXgdm" ]; then
+ cp -a /usr/share/themes/gdm /mnt/var/lib/openslx/themes
+ sed -i "s,GraphicalThemeDir=.*,GraphicalThemeDir=/var/lib/openslx/themes," \
+ /mnt/etc/gdm/gdm.conf
+ sed -i "s,GraphicalTheme=.*GraphicalTheme=gdm," /mnt/etc/gdm/gdm.conf
+ fi
- [ $DEBUGLEVEL -gt 0 ] && echo "done with 'displaymanager' os-plugin ...";
+ if [ "${desktop_manager}" = "XXXkdm" ]; then
+ cp -a /usr/share/themes/kdm /mnt/var/lib/openslx/themes
+ sed -i "s,Theme=.*,Theme=/var/lib/openslx/themes/kdm," /mnt/etc/kde3/kdm/kdmrc
+ sed -i "s,UseTheme=.*,UseTheme=true," /mnt/etc/kde3/kdm/kdmrc
+ fi
- fi
+ [ $DEBUGLEVEL -gt 0 ] && echo "done with 'desktop' os-plugin ...";
+
+ fi
fi