summaryrefslogtreecommitdiffstats
path: root/boot-env
diff options
context:
space:
mode:
authorOliver Tappe2008-06-07 00:45:28 +0200
committerOliver Tappe2008-06-07 00:45:28 +0200
commitd8296da5f5f9fbbabf01867bf51505416fe27d02 (patch)
treef2f680680acdbcdce8b2deb8da302a02c20d01be /boot-env
parentRemoving old uclib testing stuff ... (diff)
downloadcore-d8296da5f5f9fbbabf01867bf51505416fe27d02.tar.gz
core-d8296da5f5f9fbbabf01867bf51505416fe27d02.tar.xz
core-d8296da5f5f9fbbabf01867bf51505416fe27d02.zip
* moved PXE-theming stuff into boot-env and adjusted the code to allow for
user specified PXE-themes, too (which shall live in /etc/opt/opeslx/boot-env/pxe/themes). * removed theming folder, since it is now obsolete git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@1851 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'boot-env')
-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);
+ }
}
}