From d9d2ded910b2c94bbc0301f6cc1d127fbe653f23 Mon Sep 17 00:00:00 2001 From: Michael Janczyk Date: Fri, 3 Apr 2009 17:57:11 +0000 Subject: 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 --- boot-env/OpenSLX/BootEnvironment/PXE.pm | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) (limited to 'boot-env/OpenSLX/BootEnvironment/PXE.pm') 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/] -- cgit v1.2.3-55-g7522