From 5a8c8a1638eea2ff6897046fcbc94bb42ccbe94d Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Sun, 6 Apr 2008 13:40:09 +0000 Subject: * 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 --- installer/OpenSLX/OSSetup/Distro/Any_Clone.pm | 4 +- installer/OpenSLX/OSSetup/Distro/Base.pm | 4 +- installer/OpenSLX/OSSetup/Distro/Debian.pm | 4 +- installer/OpenSLX/OSSetup/Distro/Debian_3_1.pm | 4 +- installer/OpenSLX/OSSetup/Distro/Fedora.pm | 4 +- installer/OpenSLX/OSSetup/Distro/Gentoo.pm | 4 +- installer/OpenSLX/OSSetup/Distro/SUSE.pm | 85 -------------------------- installer/OpenSLX/OSSetup/Distro/Suse.pm | 85 ++++++++++++++++++++++++++ installer/OpenSLX/OSSetup/Distro/Ubuntu.pm | 4 +- 9 files changed, 99 insertions(+), 99 deletions(-) delete mode 100644 installer/OpenSLX/OSSetup/Distro/SUSE.pm create mode 100644 installer/OpenSLX/OSSetup/Distro/Suse.pm (limited to 'installer/OpenSLX/OSSetup/Distro') diff --git a/installer/OpenSLX/OSSetup/Distro/Any_Clone.pm b/installer/OpenSLX/OSSetup/Distro/Any_Clone.pm index 005c0355..43385a29 100644 --- a/installer/OpenSLX/OSSetup/Distro/Any_Clone.pm +++ b/installer/OpenSLX/OSSetup/Distro/Any_Clone.pm @@ -8,8 +8,8 @@ # # General information about OpenSLX can be found at http://openslx.org/ # ----------------------------------------------------------------------------- -# Any_Clone.pm -# - provides generic clone-only overrides of the OpenSLX OSSetup API. +# OSSetup/Distro/Any_Clone.pm +# - provides generic clone-only overrides of the OSSetup Distro API. # ----------------------------------------------------------------------------- package OpenSLX::OSSetup::Distro::Any_Clone; diff --git a/installer/OpenSLX/OSSetup/Distro/Base.pm b/installer/OpenSLX/OSSetup/Distro/Base.pm index 573114e8..bcc331bb 100644 --- a/installer/OpenSLX/OSSetup/Distro/Base.pm +++ b/installer/OpenSLX/OSSetup/Distro/Base.pm @@ -8,8 +8,8 @@ # # General information about OpenSLX can be found at http://openslx.org/ # ----------------------------------------------------------------------------- -# Base.pm -# - provides empty base of the OpenSLX OSSetup API. +# OSSetup/Distro/Base.pm +# - provides base implementation of the OSSetup Distro API. # ----------------------------------------------------------------------------- package OpenSLX::OSSetup::Distro::Base; diff --git a/installer/OpenSLX/OSSetup/Distro/Debian.pm b/installer/OpenSLX/OSSetup/Distro/Debian.pm index c8c02cdd..85f72d4f 100644 --- a/installer/OpenSLX/OSSetup/Distro/Debian.pm +++ b/installer/OpenSLX/OSSetup/Distro/Debian.pm @@ -8,8 +8,8 @@ # # General information about OpenSLX can be found at http://openslx.org/ # ----------------------------------------------------------------------------- -# Debian.pm -# - provides Debian-specific overrides of the OpenSLX OSSetup API. +# OSSetup/Distro/Debian.pm +# - provides Debian-specific overrides of the OSSetup Distro API. # ----------------------------------------------------------------------------- package OpenSLX::OSSetup::Distro::Debian; diff --git a/installer/OpenSLX/OSSetup/Distro/Debian_3_1.pm b/installer/OpenSLX/OSSetup/Distro/Debian_3_1.pm index e6ea3722..03c6fdf9 100644 --- a/installer/OpenSLX/OSSetup/Distro/Debian_3_1.pm +++ b/installer/OpenSLX/OSSetup/Distro/Debian_3_1.pm @@ -8,8 +8,8 @@ # # General information about OpenSLX can be found at http://openslx.org/ # ----------------------------------------------------------------------------- -# Debian_3_1.pm -# - provides Debian-3.1-specific overrides of the OpenSLX OSSetup API. +# OSSetup/Distro/Debian_3_1.pm +# - provides Debian-3.1-specific overrides of the OSSetup Distro API. # ----------------------------------------------------------------------------- package OpenSLX::OSSetup::Distro::Debian_3_1; diff --git a/installer/OpenSLX/OSSetup/Distro/Fedora.pm b/installer/OpenSLX/OSSetup/Distro/Fedora.pm index 0bc9ebdc..80480340 100644 --- a/installer/OpenSLX/OSSetup/Distro/Fedora.pm +++ b/installer/OpenSLX/OSSetup/Distro/Fedora.pm @@ -8,8 +8,8 @@ # # General information about OpenSLX can be found at http://openslx.org/ # ----------------------------------------------------------------------------- -# Fedora.pm -# - provides Fedora-specific overrides of the OpenSLX OSSetup API. +# OSSetup/Distro/Fedora.pm +# - provides Fedora-specific overrides of the OSSetup Distro API. # ----------------------------------------------------------------------------- package OpenSLX::OSSetup::Distro::Fedora; diff --git a/installer/OpenSLX/OSSetup/Distro/Gentoo.pm b/installer/OpenSLX/OSSetup/Distro/Gentoo.pm index c49ba5d6..1f1e0577 100644 --- a/installer/OpenSLX/OSSetup/Distro/Gentoo.pm +++ b/installer/OpenSLX/OSSetup/Distro/Gentoo.pm @@ -8,8 +8,8 @@ # # General information about OpenSLX can be found at http://openslx.org/ # ----------------------------------------------------------------------------- -# SUSE.pm -# - provides SUSE-specific overrides of the OpenSLX OSSetup API. +# OSSetup/Distro/Gentoo.pm +# - provides Gentoo-specific overrides of the OSSetup Distro API. # ----------------------------------------------------------------------------- package OpenSLX::OSSetup::Distro::Gentoo; diff --git a/installer/OpenSLX/OSSetup/Distro/SUSE.pm b/installer/OpenSLX/OSSetup/Distro/SUSE.pm deleted file mode 100644 index 192ea3aa..00000000 --- a/installer/OpenSLX/OSSetup/Distro/SUSE.pm +++ /dev/null @@ -1,85 +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::SUSE; - -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 initialize -{ - my $self = shift; - my $engine = shift; - - $self->SUPER::initialize($engine); - $self->{'packager-type'} = 'rpm'; - $self->{'meta-packager-type'} = $ENV{SLX_META_PACKAGER} || 'smart'; - - if ($engine->{'action-type'} eq 'install') { - # Inform SUSE RPMs that we're performing an installation - this is - # only important for installations taking place in stage 1c: - $ENV{YAST_IS_RUNNING} = "instsys"; - } - - return; -} - -sub fixPrerequiredFiles -{ - my $self = shift; - my $stage1cDir = shift; - - chown(0, 0, "$stage1cDir/etc/group", "$stage1cDir/etc/passwd", - "$stage1cDir/etc/shadow"); - return; -} - -sub updateDistroConfig -{ - my $self = shift; - - # invoke SuSEconfig in order to allow it to update the configuration: - if (slxsystem('SuSEconfig')) { - die _tr("unable to run SuSEconfig (%s)", $!); - } - $self->SUPER::updateDistroConfig(); - return; -} - -sub hashPassword -{ - my $self = shift; - my $password = shift; - - my $busyboxBin = $self->{engine}->{'busybox-binary'}; - my $hashedPassword = qx{$busyboxBin cryptpw -a blowfish '$password'}; - chomp $hashedPassword; - - return $hashedPassword; -} - -1; diff --git a/installer/OpenSLX/OSSetup/Distro/Suse.pm b/installer/OpenSLX/OSSetup/Distro/Suse.pm new file mode 100644 index 00000000..97da4f70 --- /dev/null +++ b/installer/OpenSLX/OSSetup/Distro/Suse.pm @@ -0,0 +1,85 @@ +# 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/ +# ----------------------------------------------------------------------------- +# OSSetup/Distro/Suse.pm +# - provides SUSE-specific overrides of the OSSetup Distro API. +# ----------------------------------------------------------------------------- +package OpenSLX::OSSetup::Distro::Suse; + +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 initialize +{ + my $self = shift; + my $engine = shift; + + $self->SUPER::initialize($engine); + $self->{'packager-type'} = 'rpm'; + $self->{'meta-packager-type'} = $ENV{SLX_META_PACKAGER} || 'smart'; + + if ($engine->{'action-type'} eq 'install') { + # Inform SUSE RPMs that we're performing an installation - this is + # only important for installations taking place in stage 1c: + $ENV{YAST_IS_RUNNING} = "instsys"; + } + + return; +} + +sub fixPrerequiredFiles +{ + my $self = shift; + my $stage1cDir = shift; + + chown(0, 0, "$stage1cDir/etc/group", "$stage1cDir/etc/passwd", + "$stage1cDir/etc/shadow"); + return; +} + +sub updateDistroConfig +{ + my $self = shift; + + # invoke SuSEconfig in order to allow it to update the configuration: + if (slxsystem('SuSEconfig')) { + die _tr("unable to run SuSEconfig (%s)", $!); + } + $self->SUPER::updateDistroConfig(); + return; +} + +sub hashPassword +{ + my $self = shift; + my $password = shift; + + my $busyboxBin = $self->{engine}->{'busybox-binary'}; + my $hashedPassword = qx{$busyboxBin cryptpw -a blowfish '$password'}; + chomp $hashedPassword; + + return $hashedPassword; +} + +1; diff --git a/installer/OpenSLX/OSSetup/Distro/Ubuntu.pm b/installer/OpenSLX/OSSetup/Distro/Ubuntu.pm index c0660818..a2a397ed 100644 --- a/installer/OpenSLX/OSSetup/Distro/Ubuntu.pm +++ b/installer/OpenSLX/OSSetup/Distro/Ubuntu.pm @@ -8,8 +8,8 @@ # # General information about OpenSLX can be found at http://openslx.org/ # ----------------------------------------------------------------------------- -# Ubuntu.pm -# - provides Ubuntu-specific overrides of the OpenSLX OSSetup API. +# OSSetup/Distro/Ubuntu.pm +# - provides Ubuntu-specific overrides of the OSSetup Distro API. # ----------------------------------------------------------------------------- package OpenSLX::OSSetup::Distro::Ubuntu; -- cgit v1.2.3-55-g7522