From 4b35e3ae3b76a192d02e08940d56b4240cf2f52e Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Mon, 24 Mar 2008 10:54:23 +0000 Subject: * Adjusted OSSetup::Distro implementations to apply necessary fixes as part of any session, not just installation, since these must be executed for shell and plugin sessions, too. git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@1679 95ad53e4-c205-0410-b2fa-d234c58c8868 --- installer/OpenSLX/OSSetup/Distro/Debian_3_1.pm | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) (limited to 'installer/OpenSLX/OSSetup/Distro/Debian_3_1.pm') diff --git a/installer/OpenSLX/OSSetup/Distro/Debian_3_1.pm b/installer/OpenSLX/OSSetup/Distro/Debian_3_1.pm index 7f390bc1..e6ea3722 100644 --- a/installer/OpenSLX/OSSetup/Distro/Debian_3_1.pm +++ b/installer/OpenSLX/OSSetup/Distro/Debian_3_1.pm @@ -43,13 +43,32 @@ sub preSystemInstallationHook chmod 0755, '/usr/sbin/mkinitrd'; } -sub postSystemInstallationHook +sub startSession { - my $self = shift; + my $self = shift; + my $osDir = shift; + + $self->SUPER::startSession($osDir); + + # As in preSystemInstallationHook, we replace /usr/sbin/mkinitrd with a + # dummy, in order to skip the initrd-creation. + # + # During installation, this might not exist yet, so we better check + if (-e '/usr/sbin/mkinitrd') { + rename('/usr/sbin/mkinitrd', '/usr/sbin/_mkinitrd'); + spitFile('/usr/sbin/mkinitrd', "#! /bin/sh\ntouch \$2\n"); + chmod 0755, '/usr/sbin/mkinitrd'; + } +} + +sub finishSession +{ + my $self = shift; # restore /usr/sbin/mkinitrd rename('/usr/sbin/_mkinitrd', '/usr/sbin/mkinitrd'); - $self->SUPER::postSystemInstallationHook(); + + $self->SUPER::finishSession(); } 1; \ No newline at end of file -- cgit v1.2.3-55-g7522