summaryrefslogtreecommitdiffstats
path: root/installer
diff options
context:
space:
mode:
authorOliver Tappe2007-08-03 21:57:52 +0200
committerOliver Tappe2007-08-03 21:57:52 +0200
commit061c50264ce019265fef3933d53a42a923847bd8 (patch)
tree843c80919efacf953ed751bcf4185c5e213acb3c /installer
parentStarted on the cdboot/init and fixed a setting in mkdxsinitrd. (diff)
downloadcore-061c50264ce019265fef3933d53a42a923847bd8.tar.gz
core-061c50264ce019265fef3933d53a42a923847bd8.tar.xz
core-061c50264ce019265fef3933d53a42a923847bd8.zip
* finished support for installation of Debian & Ubuntu. Things seem to be
working more or less fine now. Some systems I have tested do not boot into the graphical environment automatically, but that may be a problem in stage3 (as manually invoking gdm works). git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1313 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'installer')
-rw-r--r--installer/OpenSLX/OSSetup/Distro/Base.pm8
-rw-r--r--installer/OpenSLX/OSSetup/Distro/Debian.pm54
-rw-r--r--installer/OpenSLX/OSSetup/Distro/Debian_3_1.pm35
-rw-r--r--installer/OpenSLX/OSSetup/Distro/Debian_4_0.pm10
-rw-r--r--installer/OpenSLX/OSSetup/Distro/SUSE.pm8
-rw-r--r--installer/OpenSLX/OSSetup/Distro/Ubuntu.pm54
-rw-r--r--installer/OpenSLX/OSSetup/Distro/Ubuntu_6_10.pm14
-rw-r--r--installer/OpenSLX/OSSetup/Engine.pm4
8 files changed, 185 insertions, 2 deletions
diff --git a/installer/OpenSLX/OSSetup/Distro/Base.pm b/installer/OpenSLX/OSSetup/Distro/Base.pm
index f29c7e46..e1ca0a64 100644
--- a/installer/OpenSLX/OSSetup/Distro/Base.pm
+++ b/installer/OpenSLX/OSSetup/Distro/Base.pm
@@ -213,6 +213,14 @@ sub pickKernelFile
return $newestKernelFile;
}
+sub preSystemInstallationHook
+{
+}
+
+sub postSystemInstallationHook
+{
+}
+
1;
################################################################################
diff --git a/installer/OpenSLX/OSSetup/Distro/Debian.pm b/installer/OpenSLX/OSSetup/Distro/Debian.pm
index 69f08256..4cd921de 100644
--- a/installer/OpenSLX/OSSetup/Distro/Debian.pm
+++ b/installer/OpenSLX/OSSetup/Distro/Debian.pm
@@ -19,6 +19,7 @@ use warnings;
use base qw(OpenSLX::OSSetup::Distro::Base);
use OpenSLX::Basics;
+use OpenSLX::Utils;
################################################################################
### interface methods
@@ -42,4 +43,57 @@ sub initialize
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 Ubuntu from doing this, as this is not really very supportive
+ # of folder-based installations ...
+ 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();
+}
+
1; \ No newline at end of file
diff --git a/installer/OpenSLX/OSSetup/Distro/Debian_3_1.pm b/installer/OpenSLX/OSSetup/Distro/Debian_3_1.pm
index 6fd4c74e..59e18820 100644
--- a/installer/OpenSLX/OSSetup/Distro/Debian_3_1.pm
+++ b/installer/OpenSLX/OSSetup/Distro/Debian_3_1.pm
@@ -19,6 +19,7 @@ use warnings;
use base qw(OpenSLX::OSSetup::Distro::Debian);
use OpenSLX::Basics;
+use OpenSLX::Utils;
################################################################################
### implementation
@@ -64,9 +65,43 @@ sub initDistroInfo
kernel-image-2.6-386
locales
",
+
+ 'gnome' => "
+ <<<default>>>
+ gnome
+ ",
+
+ 'kde' => "
+ <<<default>>>
+ kde
+ ",
+
};
return;
}
+sub preSystemInstallationHook
+{
+ my $self = shift;
+
+ $self->SUPER::preSystemInstallationHook();
+
+ # replace /usr/sbin/mkinitrd with a dummy, in order to skip the hopeless
+ # pass at trying to create an initrd. It doesn't work and we don't need
+ # it either.
+ rename('/usr/sbin/mkinitrd', '/usr/sbin/_mkinitrd');
+ spitFile('/usr/sbin/mkinitrd', "#! /bin/sh\ntouch \$2\n");
+ chmod 0755, '/usr/sbin/mkinitrd';
+}
+
+sub postSystemInstallationHook
+{
+ my $self = shift;
+
+ # restore /usr/sbin/mkinitrd
+ rename('/usr/sbin/_mkinitrd', '/usr/sbin/mkinitrd');
+ $self->SUPER::postSystemInstallationHook();
+}
+
1; \ No newline at end of file
diff --git a/installer/OpenSLX/OSSetup/Distro/Debian_4_0.pm b/installer/OpenSLX/OSSetup/Distro/Debian_4_0.pm
index 766235bb..36b2b1be 100644
--- a/installer/OpenSLX/OSSetup/Distro/Debian_4_0.pm
+++ b/installer/OpenSLX/OSSetup/Distro/Debian_4_0.pm
@@ -64,6 +64,16 @@ sub initDistroInfo
linux-image-486
locales-all
",
+
+ 'gnome' => "
+ <<<default>>>
+ gnome
+ ",
+
+ 'kde' => "
+ <<<default>>>
+ kde
+ ",
};
return;
diff --git a/installer/OpenSLX/OSSetup/Distro/SUSE.pm b/installer/OpenSLX/OSSetup/Distro/SUSE.pm
index 00cd4bc4..2ea20fc3 100644
--- a/installer/OpenSLX/OSSetup/Distro/SUSE.pm
+++ b/installer/OpenSLX/OSSetup/Distro/SUSE.pm
@@ -38,7 +38,13 @@ sub initialize
$self->SUPER::initialize($engine);
$self->{'packager-type'} = 'rpm';
$self->{'meta-packager-type'} = $ENV{SLX_META_PACKAGER} || 'smart';
- $ENV{YAST_IS_RUNNING} = "instsys";
+
+ 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;
}
diff --git a/installer/OpenSLX/OSSetup/Distro/Ubuntu.pm b/installer/OpenSLX/OSSetup/Distro/Ubuntu.pm
index 32e9e91c..029c35c3 100644
--- a/installer/OpenSLX/OSSetup/Distro/Ubuntu.pm
+++ b/installer/OpenSLX/OSSetup/Distro/Ubuntu.pm
@@ -19,6 +19,7 @@ use warnings;
use base qw(OpenSLX::OSSetup::Distro::Base);
use OpenSLX::Basics;
+use OpenSLX::Utils;
################################################################################
### interface methods
@@ -42,4 +43,57 @@ sub initialize
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 Ubuntu from doing this, as this is not really very supportive
+ # of folder-based installations ...
+ 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();
+}
+
1; \ No newline at end of file
diff --git a/installer/OpenSLX/OSSetup/Distro/Ubuntu_6_10.pm b/installer/OpenSLX/OSSetup/Distro/Ubuntu_6_10.pm
index 636d5bfa..4d3f1192 100644
--- a/installer/OpenSLX/OSSetup/Distro/Ubuntu_6_10.pm
+++ b/installer/OpenSLX/OSSetup/Distro/Ubuntu_6_10.pm
@@ -81,6 +81,20 @@ sub initDistroInfo
language-pack-de
linux-image-generic
",
+ 'gnome' => "
+ <<<default>>>
+ ubuntu-desktop
+ ",
+
+ 'kde' => "
+ <<<default>>>
+ kubuntu-desktop
+ ",
+
+ 'xfce' => "
+ <<<default>>>
+ xubuntu-desktop
+ ",
};
return;
}
diff --git a/installer/OpenSLX/OSSetup/Engine.pm b/installer/OpenSLX/OSSetup/Engine.pm
index 2a6d4e35..6a3324de 100644
--- a/installer/OpenSLX/OSSetup/Engine.pm
+++ b/installer/OpenSLX/OSSetup/Engine.pm
@@ -34,7 +34,7 @@ use vars qw(%supportedDistros);
%supportedDistros = (
'debian-3.1' => {
- module => 'Debian_3_1', support => 'clone'
+ module => 'Debian_3_1', support => 'clone,install'
},
'debian-4.0' => {
module => 'Debian_4_0', support => 'clone,install'
@@ -1153,9 +1153,11 @@ sub _setupStage1D
$self->_callChrootedFunction({
chrootDir => $self->{'vendor-os-path'},
function => sub {
+ $self->{distro}->preSystemInstallationHook();
$self->_stage1D_setupPackageSources();
$self->_stage1D_updateBasicVendorOS();
$self->_stage1D_installPackageSelection();
+ $self->{distro}->postSystemInstallationHook();
},
updateConfig => 1,
});