summaryrefslogtreecommitdiffstats
path: root/boot-env/OpenSLX/BootEnvironment/PXE.pm
diff options
context:
space:
mode:
Diffstat (limited to 'boot-env/OpenSLX/BootEnvironment/PXE.pm')
-rw-r--r--boot-env/OpenSLX/BootEnvironment/PXE.pm24
1 files changed, 17 insertions, 7 deletions
diff --git a/boot-env/OpenSLX/BootEnvironment/PXE.pm b/boot-env/OpenSLX/BootEnvironment/PXE.pm
index dde9c29d..a764826d 100644
--- a/boot-env/OpenSLX/BootEnvironment/PXE.pm
+++ b/boot-env/OpenSLX/BootEnvironment/PXE.pm
@@ -131,7 +131,8 @@ sub _getTemplate
# fetch PXE-template, if any
my $pxeTemplate =
"# generated by slxconfig-demuxer (on $callDate at $callTime)\n";
- my $pxeTemplateFile = "$openslxConfig{'config-path'}/PXE-template";
+ my $pxeTemplateFile
+ = "$openslxConfig{'config-path'}/boot-env/pxe/menu-template";
if (-e $pxeTemplateFile) {
$pxeTemplate .= slurpFile($pxeTemplateFile);
} else {
@@ -140,13 +141,22 @@ sub _getTemplate
# now append (and thus override) the PXE-template with the settings of the
# selected PXE-theme, if any
- my $basePath = $openslxConfig{'base-path'};
- my $pxeTheme = $openslxConfig{'pxe-theme'};
+ my $basePath = $openslxConfig{'base-path'};
+ my $configPath = $openslxConfig{'config-path'};
+ my $pxeTheme = $openslxConfig{'pxe-theme'};
if (defined $pxeTheme) {
- my $pxeThemeConfig
- = "$basePath/share/themes/${pxeTheme}/pxe/theme.conf";
- if (-e $pxeThemeConfig) {
- $pxeTemplate .= slurpFile($pxeThemeConfig);
+ # let user stuff in config path win over our stuff in base path
+ my $pxeThemeInConfig
+ = "$configPath/boot-env/pxe/themes/${pxeTheme}/theme.conf";
+ if (-e $pxeThemeInConfig) {
+ $pxeTemplate .= slurpFile($pxeThemeInConfig);
+ }
+ else {
+ my $pxeThemeInBase
+ = "$basePath/share/boot-env/pxe/themes/${pxeTheme}/theme.conf";
+ if (-e $pxeThemeInBase) {
+ $pxeTemplate .= slurpFile($pxeThemeInBase);
+ }
}
}