summaryrefslogtreecommitdiffstats
path: root/os-plugins/plugins/desktop
diff options
context:
space:
mode:
authorOliver Tappe2008-04-06 15:40:09 +0200
committerOliver Tappe2008-04-06 15:40:09 +0200
commit5a8c8a1638eea2ff6897046fcbc94bb42ccbe94d (patch)
tree036281d5a9b6d847c4bfc92f3c52f96a6ada2df0 /os-plugins/plugins/desktop
parent* Instead of passing all known attributes of the current system into each plu... (diff)
downloadcore-5a8c8a1638eea2ff6897046fcbc94bb42ccbe94d.tar.gz
core-5a8c8a1638eea2ff6897046fcbc94bb42ccbe94d.tar.xz
core-5a8c8a1638eea2ff6897046fcbc94bb42ccbe94d.zip
* made names of distro module consistent across OpenSLX - now the always start with
a capital letter followed by all lowercase (Debian, Fedora, Gentoo, Suse, Ubuntu) * refactored loading of distro modules into a separate function (loadDistroModule() in Basics.pm) * finished support to logging to a file in syslog plugin * worked at desktop plugin (still not working, though) git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@1721 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'os-plugins/plugins/desktop')
-rw-r--r--os-plugins/plugins/desktop/OpenSLX/Distro/Base.pm16
-rw-r--r--os-plugins/plugins/desktop/OpenSLX/Distro/Debian.pm (renamed from os-plugins/plugins/desktop/OpenSLX/Distro/ubuntu.pm)11
-rw-r--r--os-plugins/plugins/desktop/OpenSLX/Distro/Fedora.pm30
-rw-r--r--os-plugins/plugins/desktop/OpenSLX/Distro/Gentoo.pm (renamed from os-plugins/plugins/desktop/OpenSLX/Distro/suse.pm)12
-rw-r--r--os-plugins/plugins/desktop/OpenSLX/Distro/Suse.pm (renamed from os-plugins/plugins/desktop/OpenSLX/Distro/fedora.pm)37
-rw-r--r--os-plugins/plugins/desktop/OpenSLX/Distro/Ubuntu.pm (renamed from os-plugins/plugins/desktop/OpenSLX/Distro/debian.pm)12
-rw-r--r--os-plugins/plugins/desktop/OpenSLX/Distro/gentoo.pm58
-rw-r--r--os-plugins/plugins/desktop/OpenSLX/OSPlugin/desktop.pm2
8 files changed, 78 insertions, 100 deletions
diff --git a/os-plugins/plugins/desktop/OpenSLX/Distro/Base.pm b/os-plugins/plugins/desktop/OpenSLX/Distro/Base.pm
index 3764de39..dffa1850 100644
--- a/os-plugins/plugins/desktop/OpenSLX/Distro/Base.pm
+++ b/os-plugins/plugins/desktop/OpenSLX/Distro/Base.pm
@@ -8,11 +8,10 @@
#
# General information about OpenSLX can be found at http://openslx.org/
# -----------------------------------------------------------------------------
-# base.pm
-# - provides empty base of the OpenSLX OSPlugin Distro API for the desktop
-# plugin.
+# desktop/OpenSLX/Distro/Base.pm
+# - provides base implementation of the Distro API for the desktop plugin.
# -----------------------------------------------------------------------------
-package OpenSLX::Distro::Base;
+package desktop::OpenSLX::Distro::Base;
use strict;
use warnings;
@@ -99,6 +98,15 @@ sub GDMPathInfo
return $pathInfo;
}
+sub GDMRunlevelLinks
+{
+ my $self = shift;
+
+ return unshiftHereDoc(<<" End-of-Here");
+ rllinker gdm 15 15
+ End-of-Here
+}
+
sub GDMConfigHashForWorkstation
{
my $self = shift;
diff --git a/os-plugins/plugins/desktop/OpenSLX/Distro/ubuntu.pm b/os-plugins/plugins/desktop/OpenSLX/Distro/Debian.pm
index c932f87f..361543e9 100644
--- a/os-plugins/plugins/desktop/OpenSLX/Distro/ubuntu.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/
# -----------------------------------------------------------------------------
-# Ubuntu.pm
-# - provides Ubuntu-specific overrides of the OpenSLX OSSetup API.
+# desktop/OpenSLX/Distro/Debian.pm
+# - provides Debian-specific overrides of the Distro API for the desktop
+# plugin.
# -----------------------------------------------------------------------------
-package OpenSLX::Distro::ubuntu;
+package desktop::OpenSLX::Distro::Debian;
use strict;
use warnings;
-use base qw(OpenSLX::Distro::Base);
+use base qw(desktop::OpenSLX::Distro::Base);
use OpenSLX::Basics;
use OpenSLX::Utils;
@@ -25,4 +26,6 @@ use OpenSLX::Utils;
### interface methods
################################################################################
+# TODO: implement!
+
1; \ No newline at end of file
diff --git a/os-plugins/plugins/desktop/OpenSLX/Distro/Fedora.pm b/os-plugins/plugins/desktop/OpenSLX/Distro/Fedora.pm
new file mode 100644
index 00000000..f9428aab
--- /dev/null
+++ b/os-plugins/plugins/desktop/OpenSLX/Distro/Fedora.pm
@@ -0,0 +1,30 @@
+# Copyright (c) 2006, 2007 - OpenSLX GmbH
+#
+# This program is free software distributed under the GPL version 2.
+# See http://openslx.org/COPYING
+#
+# If you have any feedback please consult http://openslx.org/feedback and
+# send your suggestions, praise, or complaints to feedback@openslx.org
+#
+# General information about OpenSLX can be found at http://openslx.org/
+# -----------------------------------------------------------------------------
+# desktop/OpenSLX/Distro/Fedora.pm
+# - provides Fedora-specific overrides of the Distro API for the desktop
+# plugin.
+# -----------------------------------------------------------------------------
+package desktop::OpenSLX::Distro::Fedora;
+
+use strict;
+use warnings;
+
+use base qw(desktop::OpenSLX::Distro::Base);
+
+use OpenSLX::Basics;
+
+################################################################################
+### interface methods
+################################################################################
+
+# TODO: implement!
+
+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/Gentoo.pm
index e360e1b5..129f4d08 100644
--- a/os-plugins/plugins/desktop/OpenSLX/Distro/suse.pm
+++ b/os-plugins/plugins/desktop/OpenSLX/Distro/Gentoo.pm
@@ -8,16 +8,16 @@
#
# General information about OpenSLX can be found at http://openslx.org/
# -----------------------------------------------------------------------------
-# SUSE.pm
-# - provides SUSE-specific overrides of the OpenSLX Distro API for the desktop
-# plugin.
+# desktop/OpenSLX/Distro/Gentoo.pm
+# - provides Gentoo-specific overrides of the Distro API for the desktop
+# plugin.
# -----------------------------------------------------------------------------
-package OpenSLX::Distro::suse;
+package desktop::OpenSLX::Distro::Gentoo;
use strict;
use warnings;
-use base qw(OpenSLX::Distro::Base);
+use base qw(desktop::OpenSLX::Distro::Base);
use OpenSLX::Basics;
@@ -25,4 +25,6 @@ use OpenSLX::Basics;
### interface methods
################################################################################
+# TODO: implement!
+
1;
diff --git a/os-plugins/plugins/desktop/OpenSLX/Distro/fedora.pm b/os-plugins/plugins/desktop/OpenSLX/Distro/Suse.pm
index 0bc9ebdc..2c3818cd 100644
--- a/os-plugins/plugins/desktop/OpenSLX/Distro/fedora.pm
+++ b/os-plugins/plugins/desktop/OpenSLX/Distro/Suse.pm
@@ -8,41 +8,32 @@
#
# General information about OpenSLX can be found at http://openslx.org/
# -----------------------------------------------------------------------------
-# Fedora.pm
-# - provides Fedora-specific overrides of the OpenSLX OSSetup API.
+# desktop/OpenSLX/Distro/Suse.pm
+# - provides SUSE-specific overrides of the Distro API for the desktop
+# plugin.
# -----------------------------------------------------------------------------
-package OpenSLX::OSSetup::Distro::Fedora;
+package desktop::OpenSLX::Distro::Suse;
use strict;
use warnings;
-use base qw(OpenSLX::OSSetup::Distro::Base);
+use base qw(desktop::OpenSLX::Distro::Base);
use OpenSLX::Basics;
+use OpenSLX::Utils;
################################################################################
### interface methods
################################################################################
-sub new
-{
- my $class = shift;
- my $self = {};
- return bless $self, $class;
-}
-sub initialize
+sub GDMRunlevelLinks
{
- my $self = shift;
- my $engine = shift;
-
- $self->SUPER::initialize($engine);
- $self->{'packager-type'} = 'rpm';
- $self->{'meta-packager-type'} = $ENV{SLX_META_PACKAGER} || 'yum';
- $self->{'stage1c-faked-files'} = [
- '/etc/fstab',
- '/etc/mtab',
- ];
- return;
+ my $self = shift;
+
+ return unshiftHereDoc(<<" End-of-Here");
+ rllinker earlygdm 1 15
+ rllinker xdm 15 1
+ End-of-Here
}
-1; \ No newline at end of file
+1;
diff --git a/os-plugins/plugins/desktop/OpenSLX/Distro/debian.pm b/os-plugins/plugins/desktop/OpenSLX/Distro/Ubuntu.pm
index 2d837629..7cd8ebc7 100644
--- a/os-plugins/plugins/desktop/OpenSLX/Distro/debian.pm
+++ b/os-plugins/plugins/desktop/OpenSLX/Distro/Ubuntu.pm
@@ -8,16 +8,16 @@
#
# General information about OpenSLX can be found at http://openslx.org/
# -----------------------------------------------------------------------------
-# debian.pm
-# - provides Debian-specific overrides of the OpenSLX Distro API for the
-# desktop plugin.
+# desktop/OpenSLX/Distro/Ubuntu.pm
+# - provides Ubuntu-specific overrides of the distro API for the desktop
+# plugin.
# -----------------------------------------------------------------------------
-package OpenSLX::Distro::debian;
+package desktop::OpenSLX::Distro::Ubuntu;
use strict;
use warnings;
-use base qw(OpenSLX::Distro::Base);
+use base qw(desktop::OpenSLX::Distro::Base);
use OpenSLX::Basics;
use OpenSLX::Utils;
@@ -26,4 +26,6 @@ use OpenSLX::Utils;
### interface methods
################################################################################
+# TODO: implement!
+
1; \ No newline at end of file
diff --git a/os-plugins/plugins/desktop/OpenSLX/Distro/gentoo.pm b/os-plugins/plugins/desktop/OpenSLX/Distro/gentoo.pm
deleted file mode 100644
index c49ba5d6..00000000
--- a/os-plugins/plugins/desktop/OpenSLX/Distro/gentoo.pm
+++ /dev/null
@@ -1,58 +0,0 @@
-# Copyright (c) 2006, 2007 - OpenSLX GmbH
-#
-# This program is free software distributed under the GPL version 2.
-# See http://openslx.org/COPYING
-#
-# If you have any feedback please consult http://openslx.org/feedback and
-# send your suggestions, praise, or complaints to feedback@openslx.org
-#
-# General information about OpenSLX can be found at http://openslx.org/
-# -----------------------------------------------------------------------------
-# SUSE.pm
-# - provides SUSE-specific overrides of the OpenSLX OSSetup API.
-# -----------------------------------------------------------------------------
-package OpenSLX::OSSetup::Distro::Gentoo;
-
-use strict;
-use warnings;
-
-use base qw(OpenSLX::OSSetup::Distro::Base);
-
-use OpenSLX::Basics;
-
-################################################################################
-### interface methods
-################################################################################
-sub new
-{
- my $class = shift;
- my $self = {};
- return bless $self, $class;
-}
-
-sub pickKernelFile
-{
- my $self = shift;
- my $kernelPath = shift;
-
- my $newestKernelFile;
- my $newestKernelFileSortKey = '';
- foreach my $kernelFile (glob("$kernelPath/kernel-genkernel-x86-*")) {
- next unless $kernelFile =~ m{
- x86-(\d+)\.(\d+)\.(\d+)(?:\.(\d+))?-(\d+(?:\.\d+)?)
- }x;
- my $sortKey
- = sprintf("%02d.%02d.%02d.%02d-%2.1f", $1, $2, $3, $4||0, $5);
- if ($newestKernelFileSortKey lt $sortKey) {
- $newestKernelFile = $kernelFile;
- $newestKernelFileSortKey = $sortKey;
- }
- }
-
- if (!defined $newestKernelFile) {
- die _tr("unable to pick a kernel-file from path '%s'!", $kernelPath);
- }
- return $newestKernelFile;
-}
-
-1;
diff --git a/os-plugins/plugins/desktop/OpenSLX/OSPlugin/desktop.pm b/os-plugins/plugins/desktop/OpenSLX/OSPlugin/desktop.pm
index 046d0759..70f8d71c 100644
--- a/os-plugins/plugins/desktop/OpenSLX/OSPlugin/desktop.pm
+++ b/os-plugins/plugins/desktop/OpenSLX/OSPlugin/desktop.pm
@@ -420,8 +420,8 @@ sub _setupGDMScript
# written by OpenSLX-plugin 'desktop'
mkdir -p $paths 2>/dev/null
ln -sf $repoPath/gdm/\$desktop_mode/gdm.conf /mnt$configFile
- rllinker gdm 1 15
End-of-Here
+ $script .= $self->{distro}->GDMRunlevelLinks();
spitFile("$repoPath/gdm/desktop.sh", $script);
return;
}