summaryrefslogtreecommitdiffstats
path: root/boot-env/OpenSLX/BootEnvironment/PXE.pm
diff options
context:
space:
mode:
authorOliver Tappe2009-01-28 17:46:42 +0100
committerOliver Tappe2009-01-28 17:46:42 +0100
commitfaa6ae6ae6fe36a5950fd0c10673c2995c0fe099 (patch)
tree5cf8ff9b846d00698f3c3f37028d1023000d3ffb /boot-env/OpenSLX/BootEnvironment/PXE.pm
parent* in case of error during creation of bootmenu files, the demuxer no longer (diff)
downloadcore-faa6ae6ae6fe36a5950fd0c10673c2995c0fe099.tar.gz
core-faa6ae6ae6fe36a5950fd0c10673c2995c0fe099.tar.xz
core-faa6ae6ae6fe36a5950fd0c10673c2995c0fe099.zip
* implemented creation of bootmenu for preboot environments
* separated general preboot-files from the cd-specific ones git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2539 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'boot-env/OpenSLX/BootEnvironment/PXE.pm')
-rw-r--r--boot-env/OpenSLX/BootEnvironment/PXE.pm9
1 files changed, 6 insertions, 3 deletions
diff --git a/boot-env/OpenSLX/BootEnvironment/PXE.pm b/boot-env/OpenSLX/BootEnvironment/PXE.pm
index 2dd0c2b7..e8c05090 100644
--- a/boot-env/OpenSLX/BootEnvironment/PXE.pm
+++ b/boot-env/OpenSLX/BootEnvironment/PXE.pm
@@ -59,6 +59,7 @@ sub writeBootloaderMenuFor
my $pxeConfig = $self->_getTemplate();
my $pxeFile = "$pxeConfigPath/$externalClientID";
my $clientAppend = $client->{attrs}->{kernel_params_client} || '';
+ my $bootURI = $client->{attrs}->{boot_uri} || '';
vlog(1, _tr("writing PXE-file %s", $pxeFile));
# set label for each system
@@ -73,7 +74,7 @@ sub writeBootloaderMenuFor
$label = $info->{name};
}
}
- $info->{label} = $label;
+ $info->{pxeLabel} = $label;
}
my $slxLabels = '';
foreach my $info (sort { $a->{label} cmp $b->{label} } @$systemInfos) {
@@ -81,9 +82,10 @@ sub writeBootloaderMenuFor
my $kernelName = basename($info->{'kernel-file'});
my $append = $info->{attrs}->{kernel_params};
$append .= " initrd=$vendorOSName/$info->{'initramfs-name'}";
+ $append .= " file=$bootURI" if length($bootURI);
$append .= " $clientAppend";
$slxLabels .= "LABEL openslx-$info->{'external-id'}\n";
- $slxLabels .= "\tMENU LABEL ^$info->{label}\n";
+ $slxLabels .= "\tMENU LABEL ^$info->{pxeLabel}\n";
$slxLabels .= "\tKERNEL $vendorOSName/$kernelName\n";
$slxLabels .= "\tAPPEND $append\n";
$slxLabels .= "\tIPAPPEND 3\n";
@@ -103,7 +105,8 @@ sub writeBootloaderMenuFor
# PXE uses 'cp850' (codepage 850) but our string is in utf-8, we have
# to convert in order to avoid showing gibberish on the client side...
- spitFile($pxeFile, $pxeConfig, { 'io-layer' => 'encoding(cp850)' } );
+ spitFile($pxeFile, $pxeConfig, { 'io-layer' => 'encoding(cp850)' } )
+ unless $self->{'dry-run'};
return 1;
}