From d8296da5f5f9fbbabf01867bf51505416fe27d02 Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Fri, 6 Jun 2008 22:45:28 +0000 Subject: * 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 --- boot-env/OpenSLX/BootEnvironment/PXE.pm | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'boot-env') 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); + } } } -- cgit v1.2.3-55-g7522