summaryrefslogtreecommitdiffstats
path: root/boot-env
diff options
context:
space:
mode:
authorOliver Tappe2008-06-08 14:34:41 +0200
committerOliver Tappe2008-06-08 14:34:41 +0200
commit10855117d20b57835d9b77cc692c7569015b193b (patch)
treece0a8ce6d19faad70280e145e61085c0bdc7c08f /boot-env
parent* improved attribute checks to protect against sub-systems not being installed (diff)
downloadcore-10855117d20b57835d9b77cc692c7569015b193b.tar.gz
core-10855117d20b57835d9b77cc692c7569015b193b.tar.xz
core-10855117d20b57835d9b77cc692c7569015b193b.zip
* sort the labels in the boot menu
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@1864 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'boot-env')
-rw-r--r--boot-env/OpenSLX/BootEnvironment/PXE.pm20
1 files changed, 12 insertions, 8 deletions
diff --git a/boot-env/OpenSLX/BootEnvironment/PXE.pm b/boot-env/OpenSLX/BootEnvironment/PXE.pm
index a764826d..931a2335 100644
--- a/boot-env/OpenSLX/BootEnvironment/PXE.pm
+++ b/boot-env/OpenSLX/BootEnvironment/PXE.pm
@@ -61,14 +61,8 @@ sub writeBootloaderMenuFor
my $clientAppend = $client->{kernel_params} || '';
vlog(1, _tr("writing PXE-file %s", $pxeFile));
- my $slxLabels = '';
+ # set label for each system
foreach my $info (@$systemInfos) {
- my $vendorOSName = $info->{'vendor-os'}->{name};
- my $kernelName = basename($info->{'kernel-file'});
- my $append = $info->{kernel_params};
- $append .= " initrd=$vendorOSName/$info->{'initramfs-name'}";
- $append .= " $clientAppend";
- $slxLabels .= "LABEL openslx-$info->{'external-id'}\n";
my $label = $info->{label} || '';
if (!length($label) || $label eq $info->{name}) {
if ($info->{name} =~ m{^(.+)::(.+)$}) {
@@ -79,7 +73,17 @@ sub writeBootloaderMenuFor
$label = $info->{name};
}
}
- $slxLabels .= "\tMENU LABEL ^$label\n";
+ $info->{label} = $label;
+ }
+ my $slxLabels = '';
+ foreach my $info (sort { $a->{label} cmp $b->{label} } @$systemInfos) {
+ my $vendorOSName = $info->{'vendor-os'}->{name};
+ my $kernelName = basename($info->{'kernel-file'});
+ my $append = $info->{kernel_params};
+ $append .= " initrd=$vendorOSName/$info->{'initramfs-name'}";
+ $append .= " $clientAppend";
+ $slxLabels .= "LABEL openslx-$info->{'external-id'}\n";
+ $slxLabels .= "\tMENU LABEL ^$info->{label}\n";
$slxLabels .= "\tKERNEL $vendorOSName/$kernelName\n";
$slxLabels .= "\tAPPEND $append\n";
$slxLabels .= "\tIPAPPEND 1\n";