From faa6ae6ae6fe36a5950fd0c10673c2995c0fe099 Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Wed, 28 Jan 2009 16:46:42 +0000 Subject: * 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 --- boot-env/OpenSLX/MakeInitRamFS/Engine/Preboot.pm | 28 ++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'boot-env/OpenSLX/MakeInitRamFS/Engine/Preboot.pm') 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; -- cgit v1.2.3-55-g7522