summaryrefslogtreecommitdiffstats
path: root/boot-env/OpenSLX/BootEnvironment/PXE.pm
diff options
context:
space:
mode:
authorMichael Janczyk2009-12-18 17:13:40 +0100
committerMichael Janczyk2009-12-18 17:13:40 +0100
commit2153cb21544a4fb8fc434f6cc5fd7f7bceab7130 (patch)
tree7b1fa5c849c28fab3647da165cc6db2c5e9d6343 /boot-env/OpenSLX/BootEnvironment/PXE.pm
parentadd git-ignore (diff)
downloadcore-2153cb21544a4fb8fc434f6cc5fd7f7bceab7130.tar.gz
core-2153cb21544a4fb8fc434f6cc5fd7f7bceab7130.tar.xz
core-2153cb21544a4fb8fc434f6cc5fd7f7bceab7130.zip
added default menu entry to pxe menu
Diffstat (limited to 'boot-env/OpenSLX/BootEnvironment/PXE.pm')
-rw-r--r--boot-env/OpenSLX/BootEnvironment/PXE.pm13
1 files changed, 11 insertions, 2 deletions
diff --git a/boot-env/OpenSLX/BootEnvironment/PXE.pm b/boot-env/OpenSLX/BootEnvironment/PXE.pm
index ceb9e1de..8387219d 100644
--- a/boot-env/OpenSLX/BootEnvironment/PXE.pm
+++ b/boot-env/OpenSLX/BootEnvironment/PXE.pm
@@ -93,7 +93,15 @@ sub writeBootloaderMenuFor
# pxe_prefix_ip set and looks like a ip
if ($info->{'pxe_prefix_ip'} =~ m/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/) {
$pxePrefix = "$info->{'pxe_prefix_ip'}::";
- $tftpPrefix = "tftp://$info->{'pxe_prefix_ip'}" if ! length($bootURI);
+ $tftpPrefix = "tftp://$info->{'pxe_prefix_ip'}"
+ if ! length($bootURI);
+ }
+
+ # set default menu entry
+ my $pxeDefault = "";
+ if ($openslxConfig{'pxe-default-menu-entry'} eq $info->{'external-id'})
+ {
+ $pxeDefault = "\tMENU DEFAULT\n";
}
$append .= " initrd=$pxePrefix$vendorOSName/$info->{'initramfs-name'}";
@@ -101,6 +109,7 @@ sub writeBootloaderMenuFor
$append .= " file=$tftpPrefix" if length($tftpPrefix);
$append .= " $clientAppend";
$slxLabels .= "LABEL openslx-$info->{'external-id'}\n";
+ $slxLabels .= $pxeDefault;
$slxLabels .= "\tMENU LABEL ^$info->{pxeLabel}\n";
$slxLabels .= "\tKERNEL $pxePrefix$vendorOSName/$kernelName\n";
$slxLabels .= "\tAPPEND $append\n";
@@ -290,7 +299,7 @@ sub _prepareBootloaderConfigFolder
return 1;
}
-# from syslinux 3.73: http://syslinux.zytor.co
+# from syslinux 3.73: http://syslinux.zytor.com
sub _random_bytes
{
my $self = shift;