summaryrefslogtreecommitdiffstats
path: root/os-plugins/plugins/desktop/OpenSLX/Distro/debian.pm
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/desktop/OpenSLX/Distro/debian.pm
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/desktop/OpenSLX/Distro/debian.pm')
-rw-r--r--os-plugins/plugins/desktop/OpenSLX/Distro/debian.pm97
1 files changed, 5 insertions, 92 deletions
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