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 --- Makefile | 58 ++++++++++++------------- boot-env/OpenSLX/BootEnvironment/PXE.pm | 24 +++++++---- config-db/PXE-template.example | 8 ---- theming/openslx/pxe/openslx.png | Bin 18173 -> 0 bytes theming/openslx/pxe/theme.conf | 72 -------------------------------- 5 files changed, 46 insertions(+), 116 deletions(-) delete mode 100644 config-db/PXE-template.example delete mode 100644 theming/openslx/pxe/openslx.png delete mode 100644 theming/openslx/pxe/theme.conf diff --git a/Makefile b/Makefile index 331819af..25b872d3 100644 --- a/Makefile +++ b/Makefile @@ -134,19 +134,18 @@ supported."; \ exit 1; \ fi; \ echo "Installing OpenSLX project files"; \ - mkdir -p $(SLX_BUILD_PATH)$(SLX_CONFIG_PATH) \ + mkdir -p $(SLX_BUILD_PATH)$(SLX_CONFIG_PATH)/boot-env/pxe/themes \ -p $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/lib \ -p $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/bin \ + -p $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/boot-env \ + -p $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/busybox \ + -p $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/initramfs \ + -p $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/preboot \ + -p $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/squashfs \ -p $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/templates \ - -p $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/preboot \ - -p $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/tpm \ - -p $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/initramfs \ - -p $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/busybox \ - -p $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/squashfs \ - -p $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/ramfstools \ + -p $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/ramfstools \ -p $(SLX_BUILD_PATH)$(SLX_PRIVATE_PATH)/config/default/initramfs \ -p $(SLX_BUILD_PATH)$(SLX_PRIVATE_PATH)/config/default/rootfs \ - -p $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/themes \ -p $(SLX_BUILD_PATH)${USR_BIN_PATH}; @ # copy license @@ -185,29 +184,30 @@ supported."; \ @ln -sf $(SLX_BASE_PATH)/bin/slx* $(SLX_BUILD_PATH)$(USR_BIN_PATH)/; \ @ # copy shareable data: - @cd initramfs/preboot; tar --exclude=.svn -cp * | \ - tar -xp -C $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/preboot; \ - cd ../initrd-stuff; tar --exclude=.svn -cp * | \ - tar -xp -C $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/initramfs; cd ../..; \ - tar --exclude=.svn -cp -C initramfs distro-specs | \ + @tar --exclude=.svn -cp -C initramfs preboot | \ tar -xp -C $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share; \ - cp -p config-db/PXE-template.example \ - $(SLX_BUILD_PATH)$(SLX_CONFIG_PATH)/; \ - cp -a installer/default_files/machine-setup.default \ - $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/templates/; \ - cp -a installer/default_files/hwdata/{pcitable.local,Cards.local} \ - $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/templates/; \ - tar --exclude=.svn -cp -C installer/default_files tftpboot | \ + tar --exclude=.svn -cp -C initramfs initrd-stuff/ | \ + tar -xp --strip-components 1 \ + -C $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/initramfs; \ + tar --exclude=.svn -cp -C initramfs distro-specs | \ tar -xp -C $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share; \ - cd theming; tar --exclude=.svn -cp * | \ - tar -xp -C $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/themes; cd ..; \ - cp -pP tools/busybox{,.x86_64,.i586,.uclib.i586} \ - $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/busybox/; \ - cp -pP tools/{ddcprobe,915resolution}{,.x86_64,.i586} \ - $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/ramfstools; \ - cp -p tools/mksquashfs $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/squashfs/; \ - cd initramfs/tpm; tar --exclude=.svn -cp * | \ - tar -xp -C $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/tpm/; \ + tar --exclude=.svn --exclude *.example -cp -C boot-env pxe | \ + tar -xp -C $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/boot-env; \ + cp -p boot-env/pxe/menu-template.example \ + $(SLX_BUILD_PATH)$(SLX_CONFIG_PATH)/boot-env/pxe/; \ + cp -a installer/default_files/machine-setup.default \ + $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/templates/; \ + cp -a installer/default_files/hwdata/{pcitable.local,Cards.local} \ + $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/templates/; \ + tar --exclude=.svn -cp -C installer/default_files tftpboot | \ + tar -xp -C $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share; \ + cp -pP tools/busybox{,.x86_64,.i586,.uclib.i586} \ + $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/busybox/; \ + cp -pP tools/{ddcprobe,915resolution}{,.x86_64,.i586} \ + $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/ramfstools; \ + cp -p tools/mksquashfs $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/squashfs/; \ + tar --exclude=.svn -cp -C initramfs tpm | \ + tar -xp -C $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share; \ @ # create default config folder hierarchy: @perl -Ilib -e 'use OpenSLX::ConfigFolder; createConfigFolderForDefaultSystem();' 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); + } } } diff --git a/config-db/PXE-template.example b/config-db/PXE-template.example deleted file mode 100644 index 9d544b71..00000000 --- a/config-db/PXE-template.example +++ /dev/null @@ -1,8 +0,0 @@ -NOESCAPE 0 -PROMPT 0 -TIMEOUT 10 -DEFAULT menu.c32 -IMPLICIT 1 -ALLOWOPTIONS 1 -MENU TITLE Was möchten Sie tun (Auswahl mittels Cursortasten)? -MENU MASTER PASSWD secret diff --git a/theming/openslx/pxe/openslx.png b/theming/openslx/pxe/openslx.png deleted file mode 100644 index a6033633..00000000 Binary files a/theming/openslx/pxe/openslx.png and /dev/null differ diff --git a/theming/openslx/pxe/theme.conf b/theming/openslx/pxe/theme.conf deleted file mode 100644 index 16fcc6a8..00000000 --- a/theming/openslx/pxe/theme.conf +++ /dev/null @@ -1,72 +0,0 @@ -DEFAULT vesamenu.c32 -MENU BACKGROUND openslx.png - -PROMPT 0 -NOESCAPE 1 -TIMEOUT 100 -TOTALTIMEOUT 3000 -MENU WIDTH 78 -MENU MARGIN @@@MENU_MARGIN@@@ -MENU PASSWORDMARGIN @@@MENU_MARGIN@@@ -MENU ROWS 12 -MENU TABMSGROW 18 -MENU CMDLINEROW 18 -MENU ENDROW -1 -MENU PASSWORDROW 18 -MENU TIMEOUTROW 18 -MENU HELPMSGROW 18 -MENU HELPMSGENDROW -1 -MENU HSHIFT 0 -MENU VSHIFT 5 - -menu color screen 37;40 #80ffffff #00000000 std -menu color border 37;40 #40000000 #ff8093a1 std -menu color title 1;37;40 #ffff8b00 #ff8093a1 std -menu color unsel 37;40 #fff0f0f0 #ff8093a1 std -menu color hotkey 1;37;40 #ffff8b00 #ff8093a1 std -menu color sel 7;37;40 #ff1c2a33 #667799bb all -menu color hotsel 1;7;37;40 #ffff8b00 #667799bb all -menu color scrollbar 37;40 #40000000 #ee000000 std -menu color tabmsg 37;40 #ffff8b00 #ff8093a1 std -menu color cmdmark 1;37;40 #ffff8b00 #ff8093a1 std -menu color cmdline 37;40 #fff0f0f0 #ff8093a1 std -menu color pwdborder 37;40 #40000000 #ff8093a1 std -menu color pwdheader 37;40 #ffff8b00 #ff8093a1 std -menu color pwdentry 37;40 #ffff8b00 #ff8093a1 std -menu color timeout_msg 37;40 #ff1c2a33 #00000000 none -menu color timeout 1;37;40 #ffff8b00 #00000000 std -menu color help 37;40 #ff1c2a33 #00000000 none -menu color msg07 37;40 #90ffffff #00000000 std - -MENU MASTER PASSWD secret -MENU PASSPROMPT Gesicherter Bereich, bitte Passwort eingeben: -MENU AUTOBOOT Auswahl startet in # Sekunden - -MENU TITLE OpenSLX - Hauptmenü - -##### -LABEL Bitte wählen Sie über die Pfeiltasten aus: - KERNEL vesamenu.c32 - APPEND pxelinux.cfg/default - -LABEL @@@SEPARATOR_LINE@@@ - KERNEL vesamenu.c32 - APPEND pxelinux.cfg/default -##### - -@@@SLX_LABELS@@@ - -##### -LABEL @@@SEPARATOR_LINE@@@ - KERNEL vesamenu.c32 - APPEND pxelinux.cfg/default -##### - -LABEL hilfe - MENU LABEL ^Hilfe - TEXT HELP - Bitte wählen Sie das gewünschte System über die Pfeiltasten - und bestätigen Sie mit der Return-Taste. - ENDTEXT - KERNEL vesamenu.c32 - APPEND pxelinux.cfg/default -- cgit v1.2.3-55-g7522