From 061c50264ce019265fef3933d53a42a923847bd8 Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Fri, 3 Aug 2007 19:57:52 +0000 Subject: * 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 --- installer/OpenSLX/OSSetup/Distro/Ubuntu.pm | 54 ++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) (limited to 'installer/OpenSLX/OSSetup/Distro/Ubuntu.pm') 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 -- cgit v1.2.3-55-g7522