summaryrefslogtreecommitdiffstats
path: root/boot-env/OpenSLX/BootEnvironment/PXE.pm
diff options
context:
space:
mode:
Diffstat (limited to 'boot-env/OpenSLX/BootEnvironment/PXE.pm')
-rw-r--r--boot-env/OpenSLX/BootEnvironment/PXE.pm27
1 files changed, 11 insertions, 16 deletions
diff --git a/boot-env/OpenSLX/BootEnvironment/PXE.pm b/boot-env/OpenSLX/BootEnvironment/PXE.pm
index c8ecd67a..160f7193 100644
--- a/boot-env/OpenSLX/BootEnvironment/PXE.pm
+++ b/boot-env/OpenSLX/BootEnvironment/PXE.pm
@@ -121,6 +121,13 @@ sub writeBootloaderMenuFor
# now add the slx-labels (inline or appended) and write the config file
if (!($pxeConfig =~ s{\@\@\@SLX_LABELS\@\@\@}{$slxLabels})) {
$pxeConfig .= $slxLabels;
+ # fetch PXE-bottom iclude, if exists (overwrite existing definitions)
+ my $pxeBottomFile
+ = "$openslxConfig{'config-path'}/boot-env/pxe/menu-bottom";
+ if (-e $pxeBottomFile) {
+ $pxeConfig .= "\n# configuration from include $pxeBottomFile\n";
+ $pxeConfig .= slurpFile($pxeBottomFile);
+ }
}
# PXE uses 'cp850' (codepage 850) but our string is in utf-8, we have
@@ -134,19 +141,12 @@ sub writeBootloaderMenuFor
sub _getTemplate
{
my $self = shift;
-
+
return $self->{'pxe-template'} if $self->{'pxe-template'};
my $basePath = $openslxConfig{'base-path'};
my $configPath = $openslxConfig{'config-path'};
- my $tftpServer = $openslxConfig{'tftp-server-ip'};
my $pxeTheme = $openslxConfig{'pxe-theme'};
- if (defined $tftpServer) {
- $tftpServer .= "::";
- }
- else {
- $tftpServer = "";
- }
my ($sec, $min, $hour, $day, $mon, $year) = (localtime);
$mon++;
@@ -157,9 +157,7 @@ sub _getTemplate
# generate PXE-Menu
my $pxeTemplate =
"# generated by slxconfig-demuxer (on $callDate at $callTime)\n";
- # append tftp setver prefix if necessary
- $pxeTemplate .= "\nDEFAULT $tftpServer";
- $pxeTemplate .= "vesamenu.c32\n";
+ $pxeTemplate .= "\nDEFAULT vesamenu.c32\n";
# include static defaults
$pxeTemplate .= "\n# static configuration (override with include file)\n";
$pxeTemplate .= "NOESCAPE 0\n";
@@ -195,10 +193,6 @@ sub _getTemplate
}
if (defined $pic) {
my $pxeBackground = "$pxeThemePath/$pic";
- my $picPrefix = $tftpServer;
- # append tftp setver prefix to $pic
- $picPrefix .= $pic;
- $pxeTemplate =~ s,$pic,$picPrefix,g;
if (-e $pxeBackground && !$self->{'dry-run'}) {
slxsystem(qq[cp "$pxeBackground" $self->{'target-path'}/]);
}
@@ -237,7 +231,8 @@ sub _prepareBootloaderConfigFolder
rmtree($pxeConfigPath);
mkpath($pxeConfigPath);
- for my $file ('pxelinux.0', 'vesamenu.c32') {
+ for my $file ('pxelinux.0', 'pxechain.com', 'vesamenu.c32',
+ 'mboot.c32', 'kernel-shutdown', 'initramfs-shutdown') {
if (!-e "$pxePath/$file") {
slxsystem(
qq[cp -p "$basePath/share/boot-env/pxe/$file" $pxePath/]