summaryrefslogtreecommitdiffstats
path: root/boot-env/OpenSLX/MakeInitRamFS/Engine
diff options
context:
space:
mode:
authorOliver Tappe2009-01-28 17:46:42 +0100
committerOliver Tappe2009-01-28 17:46:42 +0100
commitfaa6ae6ae6fe36a5950fd0c10673c2995c0fe099 (patch)
tree5cf8ff9b846d00698f3c3f37028d1023000d3ffb /boot-env/OpenSLX/MakeInitRamFS/Engine
parent* in case of error during creation of bootmenu files, the demuxer no longer (diff)
downloadcore-faa6ae6ae6fe36a5950fd0c10673c2995c0fe099.tar.gz
core-faa6ae6ae6fe36a5950fd0c10673c2995c0fe099.tar.xz
core-faa6ae6ae6fe36a5950fd0c10673c2995c0fe099.zip
* implemented creation of bootmenu for preboot environments
* separated general preboot-files from the cd-specific ones git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2539 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'boot-env/OpenSLX/MakeInitRamFS/Engine')
-rw-r--r--boot-env/OpenSLX/MakeInitRamFS/Engine/Base.pm4
-rw-r--r--boot-env/OpenSLX/MakeInitRamFS/Engine/Preboot.pm28
-rw-r--r--boot-env/OpenSLX/MakeInitRamFS/Engine/PrebootCD.pm2
3 files changed, 32 insertions, 2 deletions
diff --git a/boot-env/OpenSLX/MakeInitRamFS/Engine/Base.pm b/boot-env/OpenSLX/MakeInitRamFS/Engine/Base.pm
index baf6d4c3..e6e7155e 100644
--- a/boot-env/OpenSLX/MakeInitRamFS/Engine/Base.pm
+++ b/boot-env/OpenSLX/MakeInitRamFS/Engine/Base.pm
@@ -44,6 +44,8 @@ sub new
'root-path' => '!',
'slx-version' => '!',
'system-name' => '!',
+ 'preboot-id' => '?',
+ 'boot-uri' => '?',
} );
my $self = $params;
@@ -285,7 +287,7 @@ sub _writeInitramfsSetup
# generate initramfs-setup file containing attributes that are
# relevant for the initramfs only (before there's a root-FS):
my $initramfsAttrs = {
- 'host_name' => 'slx-client', # just to have something at all
+ 'host_name' => 'slx-client', # just to have something at all
'ramfs_fsmods' => $self->{attrs}->{ramfs_fsmods} || '',
'ramfs_miscmods' => $self->{attrs}->{ramfs_miscmods} || '',
'ramfs_nicmods' => $self->{attrs}->{ramfs_nicmods} || '',
diff --git a/boot-env/OpenSLX/MakeInitRamFS/Engine/Preboot.pm b/boot-env/OpenSLX/MakeInitRamFS/Engine/Preboot.pm
index 81074bce..6de04314 100644
--- a/boot-env/OpenSLX/MakeInitRamFS/Engine/Preboot.pm
+++ b/boot-env/OpenSLX/MakeInitRamFS/Engine/Preboot.pm
@@ -78,6 +78,34 @@ sub _setupBuildPath
return;
}
+sub _writeInitramfsSetup
+{
+ my $self = shift;
+
+ # generate initramfs-setup file containing attributes that are
+ # relevant for the initramfs only (before there's a root-FS) -
+ # this override adds the name of the client such that the booting
+ # system has an ID to use for accessing the corresponding boot environment
+ # on the server
+ my $initramfsAttrs = {
+ 'host_name' => 'slx-client', # just to have something at all
+ 'ramfs_miscmods' => $self->{attrs}->{ramfs_miscmods} || '',
+ 'ramfs_nicmods' => $self->{attrs}->{ramfs_nicmods} || '',
+ 'preboot_id' => $self->{'preboot-id'} || '',
+ 'boot_uri' => $self->{'boot-uri'} || '',
+ };
+ my $content = "# attributes set by slxconfig-demuxer:\n";
+ foreach my $attr (keys %$initramfsAttrs) {
+ $content .= qq[$attr="$initramfsAttrs->{$attr}"\n];
+ }
+ $self->addCMD( {
+ file => "$self->{'build-path'}/etc/initramfs-setup",
+ content => $content
+ } );
+
+ return;
+}
+
sub _copyUclibcRootfs
{
my $self = shift;
diff --git a/boot-env/OpenSLX/MakeInitRamFS/Engine/PrebootCD.pm b/boot-env/OpenSLX/MakeInitRamFS/Engine/PrebootCD.pm
index 1f6aa045..b447177c 100644
--- a/boot-env/OpenSLX/MakeInitRamFS/Engine/PrebootCD.pm
+++ b/boot-env/OpenSLX/MakeInitRamFS/Engine/PrebootCD.pm
@@ -29,7 +29,7 @@ sub _copyVariantSpecificFiles
{
my $self = shift;
- my $dataDir = "$openslxConfig{'base-path'}/share/boot-env/preboot-cd";
+ my $dataDir = "$openslxConfig{'base-path'}/share/boot-env/preboot";
$self->addCMD("cp $dataDir/init $self->{'build-path'}/");
return 1;