diff options
author | Oliver Tappe | 2008-08-31 19:50:55 +0200 |
---|---|---|
committer | Oliver Tappe | 2008-08-31 19:50:55 +0200 |
commit | 01bca3b459d49d1211e5e6b858ecdae8d9a6effd (patch) | |
tree | 2dde34667cf4a1f7fe9732af5de3183ab9705761 /boot-env/OpenSLX/BootEnvironment/PXE.pm | |
parent | * some cleanup regarding log output (diff) | |
download | core-01bca3b459d49d1211e5e6b858ecdae8d9a6effd.tar.gz core-01bca3b459d49d1211e5e6b858ecdae8d9a6effd.tar.xz core-01bca3b459d49d1211e5e6b858ecdae8d9a6effd.zip |
* moved code into BootEnvironment::Base.pm, all boot environments need to
generate the same system-specific files anyway (since the actual booting
process is identical, it's only the preboot stuff that differs)
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2163 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'boot-env/OpenSLX/BootEnvironment/PXE.pm')
-rw-r--r-- | boot-env/OpenSLX/BootEnvironment/PXE.pm | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/boot-env/OpenSLX/BootEnvironment/PXE.pm b/boot-env/OpenSLX/BootEnvironment/PXE.pm index 25f2c77f..40c6acb4 100644 --- a/boot-env/OpenSLX/BootEnvironment/PXE.pm +++ b/boot-env/OpenSLX/BootEnvironment/PXE.pm @@ -18,12 +18,10 @@ use warnings; use base qw(OpenSLX::BootEnvironment::Base); -use Clone qw(clone); use File::Basename; use File::Path; use OpenSLX::Basics; -use OpenSLX::MakeInitRamFS::Engine; use OpenSLX::Utils; sub initialize @@ -110,31 +108,6 @@ sub writeBootloaderMenuFor return 1; } -sub writeFilesRequiredForBooting -{ - my $self = shift; - my $info = shift; - my $buildPath = shift; - my $slxVersion = shift; - - my $kernelFile = $info->{'kernel-file'}; - my $kernelName = basename($kernelFile); - - my $vendorOSPath = "$self->{'target-path'}/$info->{'vendor-os'}->{name}"; - mkpath $vendorOSPath unless -e $vendorOSPath || $self->{'dry-run'}; - - my $targetKernel = "$vendorOSPath/$kernelName"; - if (!-e $targetKernel) { - vlog(1, _tr('copying kernel %s to %s', $kernelFile, $targetKernel)); - slxsystem(qq[cp -p "$kernelFile" "$targetKernel"]) - unless $self->{'dry-run'}; - } - my $initramfs = "$vendorOSPath/$info->{'initramfs-name'}"; - $self->_makeInitRamFS($info, $initramfs, $slxVersion); - - return 1; -} - sub _getTemplate { my $self = shift; @@ -242,48 +215,4 @@ sub _prepareBootloaderConfigFolder return 1; } -sub _makeInitRamFS -{ - my $self = shift; - my $info = shift; - my $initramfs = shift; - my $slxVersion = shift; - - vlog(1, _tr('generating initialramfs %s', $initramfs)); - - my $vendorOS = $info->{'vendor-os'}; - my $kernelFile = basename(followLink($info->{'kernel-file'})); - - my $attrs = clone($info->{attrs} || {}); - - my $params = { - 'attrs' => $attrs, - 'export-name' => $info->{export}->{name}, - 'export-uri' => $info->{'export-uri'}, - 'initramfs' => $initramfs, - 'kernel-params' => [ split ' ', ($info->{kernel_params} || '') ], - 'kernel-version' => $kernelFile =~ m[-(.+)$] ? $1 : '', - 'plugins' => $info->{'active-plugins'}, - 'root-path' - => "$openslxConfig{'private-path'}/stage1/$vendorOS->{name}", - 'slx-version' => $slxVersion, - 'system-name' => $info->{name}, - }; - - # TODO: make debug-level an explicit attribute, it's used in many places! - my $kernelParams = $info->{kernel_params} || ''; - if ($kernelParams =~ m{debug(?:=(\d+))?}) { - my $debugLevel = defined $1 ? $1 : '1'; - $params->{'debug-level'} = $debugLevel; - } - - my $makeInitRamFSEngine = OpenSLX::MakeInitRamFS::Engine->new($params); - $makeInitRamFSEngine->execute($self->{'dry-run'}); - - # copy back kernel-params, as they might have been changed (by plugins) - $info->{kernel_params} = join ' ', $makeInitRamFSEngine->kernelParams(); - - return; -} - 1; |