From 077d005a84f9c7b554889afcc196023bf829e86e Mon Sep 17 00:00:00 2001 From: Lyndon Brown Date: Wed, 25 Mar 2020 02:59:44 +0000 Subject: grub2|loopback: extract memtest menu entry creation to config file backwards compatibility: 1. the new file will be included alongside any user custom config 2. rather than replace MEMTEST with an actual config entry, we replace it with a line to import the content of the new file, and thus will work just as before. thus no backwards compatible breakage Gbp-Dch: Short --- share/bootloaders/grub-pc/grub.cfg | 6 ++++-- share/bootloaders/grub-pc/memtest.cfg | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 share/bootloaders/grub-pc/memtest.cfg (limited to 'share') diff --git a/share/bootloaders/grub-pc/grub.cfg b/share/bootloaders/grub-pc/grub.cfg index 8690b097b..03e681f49 100644 --- a/share/bootloaders/grub-pc/grub.cfg +++ b/share/bootloaders/grub-pc/grub.cfg @@ -59,7 +59,9 @@ fi submenu 'Advanced options...' --hotkey=a { -# Memtest (if any) -@MEMTEST@ + # Memtest (if any) + if @ENABLE_MEMTEST@; then + source /boot/grub/memtest.cfg + fi } diff --git a/share/bootloaders/grub-pc/memtest.cfg b/share/bootloaders/grub-pc/memtest.cfg new file mode 100644 index 000000000..454804bb0 --- /dev/null +++ b/share/bootloaders/grub-pc/memtest.cfg @@ -0,0 +1,3 @@ +menuentry "Memory Diagnostic Tool (@MEMTEST_VERSION@)" --hotkey=m { + linux16 @MEMTEST_BIN@ +} -- cgit v1.2.3