summaryrefslogtreecommitdiffstats
path: root/boot-env/OpenSLX/BootEnvironment/PXE.pm
diff options
context:
space:
mode:
authorMichael Janczyk2009-04-03 19:57:11 +0200
committerMichael Janczyk2009-04-03 19:57:11 +0200
commitd9d2ded910b2c94bbc0301f6cc1d127fbe653f23 (patch)
treecceae36155b9f7f7eaa9037444a594cb4688e677 /boot-env/OpenSLX/BootEnvironment/PXE.pm
parentSmall nasty bug with brtcl stp off/0 ... (diff)
downloadcore-d9d2ded910b2c94bbc0301f6cc1d127fbe653f23.tar.gz
core-d9d2ded910b2c94bbc0301f6cc1d127fbe653f23.tar.xz
core-d9d2ded910b2c94bbc0301f6cc1d127fbe653f23.zip
added version 3.73 of pxelinux to trunk
added pxechain which allows to chainload pxelinux.0 from different tftp server, so ip prefixes are no longer needed (dirk read about this feature) removed tftp-server-ip from slxsettings again ;) added small kernel and small initrd which only executes 'echo sub >/proc/sysrq-trigger' introducing menu-include / menu-botton (s. Readme.pxe) it's for testing now... if it's to complicated it can be simplyfied or removed again git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2800 95ad53e4-c205-0410-b2fa-d234c58c8868
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/]