summaryrefslogtreecommitdiffstats
path: root/os-plugins/plugins/desktop/OpenSLX/Distro/base.pm
diff options
context:
space:
mode:
authorOliver Tappe2008-03-15 19:35:27 +0100
committerOliver Tappe2008-03-15 19:35:27 +0100
commitd7e11726bbd2f8ce5fb6d756fd9bad9a709d988f (patch)
tree3be4897b4d6228c6f107e0f3e326a6f9dae2ad65 /os-plugins/plugins/desktop/OpenSLX/Distro/base.pm
parent* added support for stage1 attributes that are stored along each plugin insta... (diff)
downloadcore-d7e11726bbd2f8ce5fb6d756fd9bad9a709d988f.tar.gz
core-d7e11726bbd2f8ce5fb6d756fd9bad9a709d988f.tar.xz
core-d7e11726bbd2f8ce5fb6d756fd9bad9a709d988f.zip
* intermediate checking for new desktop plugin (successor of displaymanager
with extended scope) - does not work yet, so please do not use! git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@1634 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.pm170
1 files changed, 170 insertions, 0 deletions
diff --git a/os-plugins/plugins/desktop/OpenSLX/Distro/base.pm b/os-plugins/plugins/desktop/OpenSLX/Distro/base.pm
new file mode 100644
index 00000000..b8c7bd8a
--- /dev/null
+++ b/os-plugins/plugins/desktop/OpenSLX/Distro/base.pm
@@ -0,0 +1,170 @@
+# Copyright (c) 2008 - 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/
+# -----------------------------------------------------------------------------
+# base.pm
+# - provides empty base of the OpenSLX OSPlugin Distro API for the desktop
+# plugin.
+# -----------------------------------------------------------------------------
+package OpenSLX::Distro::base;
+
+use strict;
+use warnings;
+
+our $VERSION = 1.01; # API-version . implementation-version
+
+use OpenSLX::Basics;
+use OpenSLX::Utils;
+
+################################################################################
+### interface methods
+################################################################################
+sub new
+{
+ confess "Creating OpenSLX::OSPlugin::Distro::Base-objects directly makes no sense!";
+}
+
+sub initialize
+{
+ my $self = shift;
+ my $engine = shift;
+
+ return 1;
+}
+
+sub isInPath
+{
+ my $self = shift;
+ my $binary = shift;
+
+ my $path = qx{which $binary 2>/dev/null};
+
+ return $path ? 1 : 0;
+}
+
+sub isKDEInstalled
+{
+ my $self = shift;
+
+ return $self->isInPath('startkde');
+}
+
+sub isKDMInstalled
+{
+ my $self = shift;
+
+ return $self->isInPath('kdm');
+}
+
+sub isGNOMEInstalled
+{
+ my $self = shift;
+
+ return $self->isInPath('gnome-session');
+}
+
+sub isGDMInstalled
+{
+ my $self = shift;
+
+ return $self->isInPath('gdm');
+}
+
+sub GDMPathInfo
+{
+ my $self = shift;
+
+ my $pathInfo = {
+ config => '/etc/gdm/gdm.conf',
+ paths => [
+ '/var/lib/gdm',
+ '/var/log/gdm',
+ ],
+ };
+
+ return $pathInfo;
+}
+
+sub GDMConfigHashForWorkstation
+{
+ my $self = shift;
+
+ return {
+ 'chooser' => {
+ },
+ 'daemon' => {
+ AutomaticLoginEnable => 'false',
+ BaseXsession => '/etc/X11/Xsession',
+ Group => 'gdm',
+ User => 'gdm',
+ },
+ 'debug' => {
+ Enable => 'false',
+ },
+ 'greeter' => {
+ AllowShutdown => 'true',
+ Browser => 'false',
+ MinimalUID => '500',
+ SecureShutdown => 'false',
+ ShowDomain => 'false',
+ },
+ 'gui' => {
+ },
+ 'security' => {
+ AllowRemoteRoot => 'false',
+ DisallowTCP => 'true',
+ SupportAutomount => 'true',
+ },
+ 'server' => {
+ },
+ 'xdmcp' => {
+ Enable => 'false',
+ },
+ };
+}
+
+sub GDMConfigHashForKiosk
+{
+ my $self = shift;
+
+ my $configHash = $self->GDMConfigHashForWorkstation();
+
+ $configHash->{daemon}->{AutomaticLoginEnable} = 'true';
+ $configHash->{daemon}->{AutomaticLogin} = 'nobody';
+
+ return $configHash;
+}
+
+sub GDMConfigHashForChooser
+{
+ my $self = shift;
+
+ my $configHash = $self->GDMConfigHashForWorkstation();
+ $configHash->{xdmcp}->{Enable} = 'true';
+
+ return $configHash;
+}
+
+sub isXFCEInstalled
+{
+ my $self = shift;
+
+ # TODO: implement this!
+ warn "someone please implement this!";
+ return 0;
+}
+
+sub isXDMInstalled
+{
+ my $self = shift;
+
+ return $self->isInPath('xdm');
+}
+
+1;