From 9929f7ca1f4316fc66feab3539be4d7576769b78 Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Tue, 19 Jun 2007 15:49:36 +0000 Subject: * added support for invoking a chrooted shell for any installed vendor-OS, in order to simplify doing any manual changes to the vendor-OS. invoke 'slxos-setup shell ' to start the chrooted shell git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1175 95ad53e4-c205-0410-b2fa-d234c58c8868 --- installer/OpenSLX/OSSetup/Engine.pm | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'installer/OpenSLX/OSSetup/Engine.pm') diff --git a/installer/OpenSLX/OSSetup/Engine.pm b/installer/OpenSLX/OSSetup/Engine.pm index 4d313e73..6064ce6f 100644 --- a/installer/OpenSLX/OSSetup/Engine.pm +++ b/installer/OpenSLX/OSSetup/Engine.pm @@ -304,6 +304,25 @@ sub updateVendorOS $self->{'vendor-os-name'}); } +sub startChrootedShellForVendorOS +{ + my $self = shift; + + if (!-e $self->{'vendor-os-path'}) { + die _tr("can't start chrooted shell for vendor-OS '%s', since it doesn't exist!\n", + $self->{'vendor-os-path'}); + } + + $self->startLocalURLServersAsNeeded(); + + callInSubprocess( sub { + $self->changePersonalityIfNeeded(); + $self->startChrootedShellInStage1D(); + }); + vlog 0, _tr("Chrooted shell for vendor-OS '%s' has been closed.\n", + $self->{'vendor-os-name'}); +} + sub removeVendorOS { my $self = shift; @@ -910,6 +929,24 @@ sub updateStage1D $self->stage1D_updateBasicVendorOS(); } +sub startChrootedShellInStage1D +{ + my $self = shift; + + vlog 0, "starting chrooted shell for $self->{'vendor-os-name'}"; + vlog 0, "---------------------------------------"; + vlog 0, "- please type 'exit' if you are done! -"; + vlog 0, "---------------------------------------"; + + chrootInto($self->{'vendor-os-path'}); + + $self->{'meta-packager'}->startSession(); + slxsystem('sh'); + # hangs until user exits manually + $self->{'distro'}->updateDistroConfig(); + $self->{'meta-packager'}->finishSession(); +} + sub stage1D_setupPackageSources() { my $self = shift; -- cgit v1.2.3-55-g7522