diff options
Diffstat (limited to 'os-plugins/plugins/desktop/OpenSLX/Distro')
6 files changed, 148 insertions, 148 deletions
diff --git a/os-plugins/plugins/desktop/OpenSLX/Distro/Base.pm b/os-plugins/plugins/desktop/OpenSLX/Distro/Base.pm index 37cfff46..3764de39 100644 --- a/os-plugins/plugins/desktop/OpenSLX/Distro/Base.pm +++ b/os-plugins/plugins/desktop/OpenSLX/Distro/Base.pm @@ -9,7 +9,7 @@ # 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 +# - provides empty base of the OpenSLX OSPlugin Distro API for the desktop # plugin. # ----------------------------------------------------------------------------- package OpenSLX::Distro::Base; @@ -17,7 +17,7 @@ package OpenSLX::Distro::Base; use strict; use warnings; -our $VERSION = 1.01; # API-version . implementation-version +our $VERSION = 1.01; # API-version . implementation-version use OpenSLX::Basics; use OpenSLX::Utils; @@ -27,204 +27,204 @@ use OpenSLX::Utils; ################################################################################ sub new { - my $class = shift; - my $self = {}; - return bless $self, $class; + my $class = shift; + my $self = {}; + return bless $self, $class; } sub initialize { - my $self = shift; - $self->{engine} = shift; - - return 1; + my $self = shift; + $self->{engine} = shift; + + return 1; } sub isInPath { - my $self = shift; - my $binary = shift; - - my $path = qx{which $binary 2>/dev/null}; + my $self = shift; + my $binary = shift; + + my $path = qx{which $binary 2>/dev/null}; - return $path ? 1 : 0; + return $path ? 1 : 0; } sub isGNOMEInstalled { - my $self = shift; + my $self = shift; - return $self->isInPath('gnome-session'); + return $self->isInPath('gnome-session'); } sub isGDMInstalled { - my $self = shift; + my $self = shift; - return $self->isInPath('gdm'); + return $self->isInPath('gdm'); } sub installGNOME { - my $self = shift; + my $self = shift; - $self->{engine}->installPackages( - $self->{engine}->getInstallablePackagesForSelection('gnome') - ); + $self->{engine}->installPackages( + $self->{engine}->getInstallablePackagesForSelection('gnome') + ); - return 1; + return 1; } sub installGDM { - my $self = shift; + my $self = shift; - $self->{engine}->installPackages('gdm'); + $self->{engine}->installPackages('gdm'); - return 1; + return 1; } sub GDMPathInfo { - my $self = shift; - - my $pathInfo = { - config => '/etc/gdm/gdm.conf', - paths => [ - '/var/lib/gdm', - '/var/log/gdm', - ], - }; + my $self = shift; + + my $pathInfo = { + config => '/etc/gdm/gdm.conf', + paths => [ + '/var/lib/gdm', + '/var/log/gdm', + ], + }; - return $pathInfo; + 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', - }, - }; + 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(); + my $self = shift; + + my $configHash = $self->GDMConfigHashForWorkstation(); - $configHash->{daemon}->{AutomaticLoginEnable} = 'true'; - $configHash->{daemon}->{AutomaticLogin} = 'nobody'; + $configHash->{daemon}->{AutomaticLoginEnable} = 'true'; + $configHash->{daemon}->{AutomaticLogin} = 'nobody'; - return $configHash; + return $configHash; } sub GDMConfigHashForChooser { - my $self = shift; - - my $configHash = $self->GDMConfigHashForWorkstation(); - $configHash->{xdmcp}->{Enable} = 'true'; + my $self = shift; + + my $configHash = $self->GDMConfigHashForWorkstation(); + $configHash->{xdmcp}->{Enable} = 'true'; - return $configHash; + return $configHash; } sub isKDEInstalled { - my $self = shift; - - return $self->isInPath('startkde'); + my $self = shift; + + return $self->isInPath('startkde'); } sub isKDMInstalled { - my $self = shift; + my $self = shift; - return $self->isInPath('kdm'); + return $self->isInPath('kdm'); } sub installKDE { - my $self = shift; + my $self = shift; - $self->{engine}->installPackages( - $self->{engine}->getInstallablePackagesForSelection('kde') - ); + $self->{engine}->installPackages( + $self->{engine}->getInstallablePackagesForSelection('kde') + ); - return 1; + return 1; } sub installKDM { - my $self = shift; + my $self = shift; - $self->{engine}->installPackages('kdm'); + $self->{engine}->installPackages('kdm'); - return 1; + return 1; } sub isXFCEInstalled { - my $self = shift; + my $self = shift; - return $self->isInPath('startxfce4'); + return $self->isInPath('startxfce4'); } sub isXDMInstalled { - my $self = shift; + my $self = shift; - return $self->isInPath('xdm'); + return $self->isInPath('xdm'); } sub installXFCE { - my $self = shift; + my $self = shift; - $self->{engine}->installPackages( - $self->{engine}->getInstallablePackagesForSelection('xfce') - ); + $self->{engine}->installPackages( + $self->{engine}->getInstallablePackagesForSelection('xfce') + ); - return 1; + return 1; } sub installXDM { - my $self = shift; + my $self = shift; - $self->{engine}->installPackages('xdm'); + $self->{engine}->installPackages('xdm'); - return 1; + return 1; } 1; diff --git a/os-plugins/plugins/desktop/OpenSLX/Distro/debian.pm b/os-plugins/plugins/desktop/OpenSLX/Distro/debian.pm index c5e6c5cd..2d837629 100644 --- a/os-plugins/plugins/desktop/OpenSLX/Distro/debian.pm +++ b/os-plugins/plugins/desktop/OpenSLX/Distro/debian.pm @@ -9,7 +9,7 @@ # General information about OpenSLX can be found at http://openslx.org/ # ----------------------------------------------------------------------------- # debian.pm -# - provides Debian-specific overrides of the OpenSLX Distro API for the +# - provides Debian-specific overrides of the OpenSLX Distro API for the # desktop plugin. # ----------------------------------------------------------------------------- package OpenSLX::Distro::debian; diff --git a/os-plugins/plugins/desktop/OpenSLX/Distro/fedora.pm b/os-plugins/plugins/desktop/OpenSLX/Distro/fedora.pm index 7fe4973c..0bc9ebdc 100644 --- a/os-plugins/plugins/desktop/OpenSLX/Distro/fedora.pm +++ b/os-plugins/plugins/desktop/OpenSLX/Distro/fedora.pm @@ -9,7 +9,7 @@ # General information about OpenSLX can be found at http://openslx.org/ # ----------------------------------------------------------------------------- # Fedora.pm -# - provides Fedora-specific overrides of the OpenSLX OSSetup API. +# - provides Fedora-specific overrides of the OpenSLX OSSetup API. # ----------------------------------------------------------------------------- package OpenSLX::OSSetup::Distro::Fedora; @@ -25,24 +25,24 @@ use OpenSLX::Basics; ################################################################################ sub new { - my $class = shift; - my $self = {}; - return bless $self, $class; + my $class = shift; + my $self = {}; + return bless $self, $class; } sub initialize { - my $self = shift; - my $engine = shift; + 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; + $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; } 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 index 4d1032f7..c49ba5d6 100644 --- a/os-plugins/plugins/desktop/OpenSLX/Distro/gentoo.pm +++ b/os-plugins/plugins/desktop/OpenSLX/Distro/gentoo.pm @@ -9,7 +9,7 @@ # 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 OSSetup API. # ----------------------------------------------------------------------------- package OpenSLX::OSSetup::Distro::Gentoo; @@ -25,34 +25,34 @@ use OpenSLX::Basics; ################################################################################ sub new { - my $class = shift; - my $self = {}; - return bless $self, $class; + 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; + 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/Distro/suse.pm b/os-plugins/plugins/desktop/OpenSLX/Distro/suse.pm index 761a3705..e360e1b5 100644 --- a/os-plugins/plugins/desktop/OpenSLX/Distro/suse.pm +++ b/os-plugins/plugins/desktop/OpenSLX/Distro/suse.pm @@ -9,7 +9,7 @@ # 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 +# - provides SUSE-specific overrides of the OpenSLX Distro API for the desktop # plugin. # ----------------------------------------------------------------------------- package OpenSLX::Distro::suse; diff --git a/os-plugins/plugins/desktop/OpenSLX/Distro/ubuntu.pm b/os-plugins/plugins/desktop/OpenSLX/Distro/ubuntu.pm index 9982d363..c932f87f 100644 --- a/os-plugins/plugins/desktop/OpenSLX/Distro/ubuntu.pm +++ b/os-plugins/plugins/desktop/OpenSLX/Distro/ubuntu.pm @@ -9,7 +9,7 @@ # General information about OpenSLX can be found at http://openslx.org/ # ----------------------------------------------------------------------------- # Ubuntu.pm -# - provides Ubuntu-specific overrides of the OpenSLX OSSetup API. +# - provides Ubuntu-specific overrides of the OpenSLX OSSetup API. # ----------------------------------------------------------------------------- package OpenSLX::Distro::ubuntu; |