summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjnqnfe <jnqnfe@gmail.com>2015-01-15 03:39:00 +0000
committerLyndon Brown <jnqnfe@gmail.com>2020-03-16 23:08:26 +0000
commit31fa6abd3698453a759e56164fb09a53f6870ad1 (patch)
treee5704ea3aecf2cd6bc0743aa030ccd3ae18035aa
parent7ffd2288d944840937f556bd56703ba381f4edcc (diff)
downloadvyos-live-build-31fa6abd3698453a759e56164fb09a53f6870ad1.tar.gz
vyos-live-build-31fa6abd3698453a759e56164fb09a53f6870ad1.zip
syslinux: add memtest menu entry only if including memtest
-rwxr-xr-xscripts/build/binary_syslinux8
-rw-r--r--share/bootloaders/extlinux/advanced.cfg5
-rw-r--r--share/bootloaders/extlinux/memtest.cfg4
-rw-r--r--share/bootloaders/isolinux/advanced.cfg5
-rw-r--r--share/bootloaders/isolinux/memtest.cfg4
-rw-r--r--share/bootloaders/pxelinux/advanced.cfg5
-rw-r--r--share/bootloaders/pxelinux/memtest.cfg4
-rw-r--r--share/bootloaders/syslinux/advanced.cfg5
-rw-r--r--share/bootloaders/syslinux/memtest.cfg4
9 files changed, 28 insertions, 16 deletions
diff --git a/scripts/build/binary_syslinux b/scripts/build/binary_syslinux
index b85e56774..443d0133e 100755
--- a/scripts/build/binary_syslinux
+++ b/scripts/build/binary_syslinux
@@ -274,6 +274,14 @@ else
sed -i "s#@OPTIONAL_INSTALLER_INCLUDE@#include install.cfg#g" "${_TARGET}"/menu.cfg
fi
+# Replace placeholder for optional memtest menu entry include
+if [ ! -f "binary/${_INITRAMFS}/memtest" ]; then
+ rm -f "${_TARGET}"/memtest.cfg
+ sed -i -e "#@OPTIONAL_MEMTEST_INCLUDE@#d" "${_TARGET}"/advanced.cfg
+else
+ sed -i -e "s#@OPTIONAL_MEMTEST_INCLUDE@#include memtest.cfg#g" "${_TARGET}"/advanced.cfg
+fi
+
if [ -e "${_TARGET}/splash.svg" ]
then
case "${LB_BUILD_WITH_CHROOT}" in
diff --git a/share/bootloaders/extlinux/advanced.cfg b/share/bootloaders/extlinux/advanced.cfg
index f1098603f..11d733332 100644
--- a/share/bootloaders/extlinux/advanced.cfg
+++ b/share/bootloaders/extlinux/advanced.cfg
@@ -3,7 +3,4 @@ label hdt
menu title Hardware Detection Tool (HDT)
com32 hdt.c32
-label memtest
- menu label ^Memory Diagnostic Tool (memtest86+)
- menu title Memory Diagnostic Tool (memtest86+)
- linux /live/memtest
+@OPTIONAL_MEMTEST_INCLUDE@
diff --git a/share/bootloaders/extlinux/memtest.cfg b/share/bootloaders/extlinux/memtest.cfg
new file mode 100644
index 000000000..e7e86e30b
--- /dev/null
+++ b/share/bootloaders/extlinux/memtest.cfg
@@ -0,0 +1,4 @@
+label memtest
+ menu label ^Memory Diagnostic Tool (memtest86+)
+ menu title Memory Diagnostic Tool (memtest86+)
+ linux /live/memtest
diff --git a/share/bootloaders/isolinux/advanced.cfg b/share/bootloaders/isolinux/advanced.cfg
index f1098603f..11d733332 100644
--- a/share/bootloaders/isolinux/advanced.cfg
+++ b/share/bootloaders/isolinux/advanced.cfg
@@ -3,7 +3,4 @@ label hdt
menu title Hardware Detection Tool (HDT)
com32 hdt.c32
-label memtest
- menu label ^Memory Diagnostic Tool (memtest86+)
- menu title Memory Diagnostic Tool (memtest86+)
- linux /live/memtest
+@OPTIONAL_MEMTEST_INCLUDE@
diff --git a/share/bootloaders/isolinux/memtest.cfg b/share/bootloaders/isolinux/memtest.cfg
new file mode 100644
index 000000000..e7e86e30b
--- /dev/null
+++ b/share/bootloaders/isolinux/memtest.cfg
@@ -0,0 +1,4 @@
+label memtest
+ menu label ^Memory Diagnostic Tool (memtest86+)
+ menu title Memory Diagnostic Tool (memtest86+)
+ linux /live/memtest
diff --git a/share/bootloaders/pxelinux/advanced.cfg b/share/bootloaders/pxelinux/advanced.cfg
index f1098603f..11d733332 100644
--- a/share/bootloaders/pxelinux/advanced.cfg
+++ b/share/bootloaders/pxelinux/advanced.cfg
@@ -3,7 +3,4 @@ label hdt
menu title Hardware Detection Tool (HDT)
com32 hdt.c32
-label memtest
- menu label ^Memory Diagnostic Tool (memtest86+)
- menu title Memory Diagnostic Tool (memtest86+)
- linux /live/memtest
+@OPTIONAL_MEMTEST_INCLUDE@
diff --git a/share/bootloaders/pxelinux/memtest.cfg b/share/bootloaders/pxelinux/memtest.cfg
new file mode 100644
index 000000000..e7e86e30b
--- /dev/null
+++ b/share/bootloaders/pxelinux/memtest.cfg
@@ -0,0 +1,4 @@
+label memtest
+ menu label ^Memory Diagnostic Tool (memtest86+)
+ menu title Memory Diagnostic Tool (memtest86+)
+ linux /live/memtest
diff --git a/share/bootloaders/syslinux/advanced.cfg b/share/bootloaders/syslinux/advanced.cfg
index f1098603f..11d733332 100644
--- a/share/bootloaders/syslinux/advanced.cfg
+++ b/share/bootloaders/syslinux/advanced.cfg
@@ -3,7 +3,4 @@ label hdt
menu title Hardware Detection Tool (HDT)
com32 hdt.c32
-label memtest
- menu label ^Memory Diagnostic Tool (memtest86+)
- menu title Memory Diagnostic Tool (memtest86+)
- linux /live/memtest
+@OPTIONAL_MEMTEST_INCLUDE@
diff --git a/share/bootloaders/syslinux/memtest.cfg b/share/bootloaders/syslinux/memtest.cfg
new file mode 100644
index 000000000..e7e86e30b
--- /dev/null
+++ b/share/bootloaders/syslinux/memtest.cfg
@@ -0,0 +1,4 @@
+label memtest
+ menu label ^Memory Diagnostic Tool (memtest86+)
+ menu title Memory Diagnostic Tool (memtest86+)
+ linux /live/memtest