diff options
author | Oliver Tappe | 2007-07-03 01:27:51 +0200 |
---|---|---|
committer | Oliver Tappe | 2007-07-03 01:27:51 +0200 |
commit | ec1dde68f32d6f304217b777a54aea698f119c13 (patch) | |
tree | b1ff59249b7bd7c8a984315dbf4960c531716420 /installer/OpenSLX/OSSetup/Engine.pm | |
parent | * moved checkFlags() from Utils to Basics and used it there (in (diff) | |
download | core-ec1dde68f32d6f304217b777a54aea698f119c13.tar.gz core-ec1dde68f32d6f304217b777a54aea698f119c13.tar.xz core-ec1dde68f32d6f304217b777a54aea698f119c13.zip |
* added support for os-plugins:
+ added script slxos-plugin, which must be invoked to install a plugin into
a vendor-OS
+ added handling of plugins to slxconfig-demuxer
+ added folder structure for plugins (below 'os-plugins')
+ implemented one simple plugin, called 'Example' which contains a couple
of hints how to write own plugins
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1220 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'installer/OpenSLX/OSSetup/Engine.pm')
-rw-r--r-- | installer/OpenSLX/OSSetup/Engine.pm | 50 |
1 files changed, 49 insertions, 1 deletions
diff --git a/installer/OpenSLX/OSSetup/Engine.pm b/installer/OpenSLX/OSSetup/Engine.pm index 53fce7c7..9ae3e90a 100644 --- a/installer/OpenSLX/OSSetup/Engine.pm +++ b/installer/OpenSLX/OSSetup/Engine.pm @@ -403,6 +403,37 @@ sub startChrootedShellForVendorOS ); } +sub callChrootedFunctionForVendorOS +{ + my $self = shift; + my $function = shift; + + if (!-e $self->{'vendor-os-path'}) { + die _tr( + "can't call chrooted function for vendor-OS '%s', since it doesn't exist!\n", + $self->{'vendor-os-path'} + ); + } + + $self->startLocalURLServersAsNeeded(); + + callInSubprocess( + sub { + $self->changePersonalityIfNeeded(); + $self->callChrootedFunctionInStage1D($function); + } + ); + + $self->touchVendorOS(); + vlog( + 0, + _tr( + "Chrooted function for vendor-OS '%s' has finished.\n", + $self->{'vendor-os-name'} + ) + ); +} + sub removeVendorOS { my $self = shift; @@ -1102,9 +1133,26 @@ sub startChrootedShellInStage1D chrootInto($self->{'vendor-os-path'}); $self->{'meta-packager'}->startSession(); + + # will hang until user exits manually: slxsystem('sh'); - # hangs until user exits manually + $self->{'distro'}->updateDistroConfig(); + $self->{'meta-packager'}->finishSession(); +} + +sub callChrootedFunctionInStage1D +{ + my $self = shift; + my $function = shift; + + chrootInto($self->{'vendor-os-path'}); + + $self->{'meta-packager'}->startSession(); + + # invoke given function: + $function->(); + $self->{'distro'}->updateDistroConfig(); $self->{'meta-packager'}->finishSession(); } |