diff options
author | Oliver Tappe | 2009-01-28 22:28:19 +0100 |
---|---|---|
committer | Oliver Tappe | 2009-01-28 22:28:19 +0100 |
commit | 72c3246919419358a21083abf5bdf8c6b0995644 (patch) | |
tree | 99e3e0baabd044f48b33439b0cbcab114586cd1c | |
parent | * added invocation of w3m in preboot environment (not doing anything useful (diff) | |
download | core-72c3246919419358a21083abf5bdf8c6b0995644.tar.gz core-72c3246919419358a21083abf5bdf8c6b0995644.tar.xz core-72c3246919419358a21083abf5bdf8c6b0995644.zip |
* a little cleanup (no need for specific PrebootCD.pm in MakeInitRamFS)
* added copying of secondary uclib-rootfs layer for preboot environment
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2552 95ad53e4-c205-0410-b2fa-d234c58c8868
-rw-r--r-- | boot-env/OpenSLX/BootEnvironment/Preboot.pm | 4 | ||||
-rw-r--r-- | boot-env/OpenSLX/BootEnvironment/PrebootCD.pm | 7 | ||||
-rw-r--r-- | boot-env/OpenSLX/MakeInitRamFS/Engine/Preboot.pm | 14 | ||||
-rw-r--r-- | boot-env/OpenSLX/MakeInitRamFS/Engine/PrebootCD.pm | 38 |
4 files changed, 16 insertions, 47 deletions
diff --git a/boot-env/OpenSLX/BootEnvironment/Preboot.pm b/boot-env/OpenSLX/BootEnvironment/Preboot.pm index 430b876e..ae12a021 100644 --- a/boot-env/OpenSLX/BootEnvironment/Preboot.pm +++ b/boot-env/OpenSLX/BootEnvironment/Preboot.pm @@ -24,6 +24,7 @@ use File::Path; use OpenSLX::Basics; use OpenSLX::ConfigDB qw(:support); +use OpenSLX::MakeInitRamFS::Engine::Preboot; use OpenSLX::Utils; sub writeBootloaderMenuFor @@ -188,7 +189,8 @@ sub _makePrebootInitRamFS $params->{'debug-level'} = $debugLevel; } - my $makeInitRamFSEngine = $self->{'initramfs-factory'}->($params); + my $makeInitRamFSEngine + = OpenSLX::MakeInitRamFS::Engine::Preboot->new($params); $makeInitRamFSEngine->execute($self->{'dry-run'}); # copy back kernel-params, as they might have been changed (by plugins) diff --git a/boot-env/OpenSLX/BootEnvironment/PrebootCD.pm b/boot-env/OpenSLX/BootEnvironment/PrebootCD.pm index d4126ba9..481a61a0 100644 --- a/boot-env/OpenSLX/BootEnvironment/PrebootCD.pm +++ b/boot-env/OpenSLX/BootEnvironment/PrebootCD.pm @@ -23,7 +23,6 @@ use File::Basename; use File::Path; use OpenSLX::Basics; -use OpenSLX::MakeInitRamFS::Engine::PrebootCD; use OpenSLX::Utils; sub initialize @@ -42,12 +41,6 @@ sub initialize mkpath("$self->{'target-path'}/client-config"); } - $self->{'initramfs-factory'} = sub { - my $makeInitRamFSEngine - = OpenSLX::MakeInitRamFS::Engine::PrebootCD->new(shift); - return $makeInitRamFSEngine; - }; - return 1; } diff --git a/boot-env/OpenSLX/MakeInitRamFS/Engine/Preboot.pm b/boot-env/OpenSLX/MakeInitRamFS/Engine/Preboot.pm index 6de04314..3c012ce2 100644 --- a/boot-env/OpenSLX/MakeInitRamFS/Engine/Preboot.pm +++ b/boot-env/OpenSLX/MakeInitRamFS/Engine/Preboot.pm @@ -37,7 +37,7 @@ sub _collectCMDs $self->_writeSlxSystemConf(); $self->_copyUclibcRootfs(); - $self->_copyVariantSpecificFiles(); + $self->_copyPrebootSpecificFiles(); $self->{distro}->applyChanges($self); @@ -127,4 +127,16 @@ sub _copyUclibcRootfs return 1; } +sub _copyPrebootSpecificFiles +{ + my $self = shift; + + # write secondary rootfs-layer (including init) on top of base layer + my $prebootRootfs + = "$openslxConfig{'base-path'}/share/boot-env/preboot/uclib-rootfs"; + $self->addCMD("rsync -rlpt $prebootRootfs/ $self->{'build-path'}"); + + return 1; +} + 1; diff --git a/boot-env/OpenSLX/MakeInitRamFS/Engine/PrebootCD.pm b/boot-env/OpenSLX/MakeInitRamFS/Engine/PrebootCD.pm deleted file mode 100644 index b447177c..00000000 --- a/boot-env/OpenSLX/MakeInitRamFS/Engine/PrebootCD.pm +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (c) 2006-2008 - OpenSLX GmbH -# -# This program is free software distributed under the GPL version 2. -# See http://openslx.org/COPYING -# -# If you have any feedback please consult http://openslx.org/feedback and -# send your suggestions, praise, or complaints to feedback@openslx.org -# -# General information about OpenSLX can be found at http://openslx.org/ -# ----------------------------------------------------------------------------- -# MakeInitialRamFS::Engine::PrebootCD.pm -# - provides driver engine for MakeInitialRamFS API, implementing the -# preboot behaviour that is specific for CDs. -# ----------------------------------------------------------------------------- -package OpenSLX::MakeInitRamFS::Engine::PrebootCD; - -use strict; -use warnings; - -use base qw(OpenSLX::MakeInitRamFS::Engine::Preboot); - -use OpenSLX::Basics; -use OpenSLX::Utils; - -################################################################################ -### implementation methods -################################################################################ -sub _copyVariantSpecificFiles -{ - my $self = shift; - - my $dataDir = "$openslxConfig{'base-path'}/share/boot-env/preboot"; - $self->addCMD("cp $dataDir/init $self->{'build-path'}/"); - - return 1; -} - -1; |