summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNP-Hardass <NP-Hardass@gentoo.org>2016-05-14 18:40:28 -0400
committerNP-Hardass <NP-Hardass@gentoo.org>2016-07-09 22:48:23 -0400
commit0eb2ba9f9d96fad560ae3bbfcaed940c43d7fb4f (patch)
treea858b58a236ca4c3d3db5891a7cd42997ffbd0f7
parentf493d67769cd91b87783dcb0a8f465c767746a0a (diff)
downloadgentoo-0eb2ba9f9d96fad560ae3bbfcaed940c43d7fb4f.tar.gz
gentoo-0eb2ba9f9d96fad560ae3bbfcaed940c43d7fb4f.tar.xz
sys-apps/memtest86+: Update 39_memtest86+ to support grub submenus
Package-Manager: portage-2.2.28
-rw-r--r--sys-apps/memtest86+/files/39_memtest86+59
-rw-r--r--sys-apps/memtest86+/memtest86+-4.20-r3.ebuild (renamed from sys-apps/memtest86+/memtest86+-4.20-r2.ebuild)2
-rw-r--r--sys-apps/memtest86+/memtest86+-5.01-r2.ebuild (renamed from sys-apps/memtest86+/memtest86+-5.01-r1.ebuild)2
3 files changed, 50 insertions, 13 deletions
diff --git a/sys-apps/memtest86+/files/39_memtest86+ b/sys-apps/memtest86+/files/39_memtest86+
index 14f27a27688..10e1964cb8d 100644
--- a/sys-apps/memtest86+/files/39_memtest86+
+++ b/sys-apps/memtest86+/files/39_memtest86+
@@ -4,30 +4,67 @@
memtest=/boot/memtest86plus/memtest
+memtestbsd=/boot/memtest86plus/memtest.netbsd
+
+if [ -f "${memtest}" ] && [ -f "${memtestbsd}" ]; then
+ multiple_memtest=true
+fi
+
+submenu_indentation=""
+if [ "x${multiple_memtest}" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xy ]; then
+ submenu_indentation="${grub_tab}"
+ cat <<EOF
+submenu 'Memtest86+' {
+EOF
+fi
+
+
if [ -f "${memtest}" ]; then
+
+ gettext_printf "Found memtest image: %s\n" "${memtest}" >&2
+
device="$("${grub_probe}" --target=device "${memtest}")"
path="$(make_system_path_relative_to_its_root "${memtest}")"
cat <<EOF
-menuentry "Memtest86+" {
+${submenu_indentation}menuentry 'Memtest86+' {
EOF
- prepare_grub_to_access_device "${device}" | grub_add_tab
+
+ if [ "x${submenu_indentation}" != "x" ]; then
+ prepare_grub_to_access_device "${device}" | grub_add_tab | grub_add_tab
+ else
+ prepare_grub_to_access_device "${device}" | grub_add_tab
+ fi
+
cat <<EOF
- linux16 "${path}"
-}
+ ${submenu_indentation}linux16 "${path}"
+${submenu_indentation}}
EOF
fi
-memtest=/boot/memtest86plus/memtest.netbsd
+if [ -f "${memtestbsd}" ]; then
-if [ -f "${memtest}" ]; then
- device="$("${grub_probe}" --target=device "${memtest}")"
- path="$(make_system_path_relative_to_its_root "${memtest}")"
+ gettext_printf "Found memtest image: %s\n" "${memtestbsd}" >&2
+
+ device="$("${grub_probe}" --target=device "${memtestbsd}")"
+ path="$(make_system_path_relative_to_its_root "${memtestbsd}")"
cat <<EOF
-menuentry "Memtest86+ (netbsd)" {
+${submenu_indentation}menuentry 'Memtest86+ (netbsd)' {
EOF
- prepare_grub_to_access_device "${device}" | grub_add_tab
+
+ if [ "x${submenu_indentation}" != "x" ]; then
+ prepare_grub_to_access_device "${device}" | grub_add_tab | grub_add_tab
+ else
+ prepare_grub_to_access_device "${device}" | grub_add_tab
+ fi
+
+ cat <<EOF
+ ${submenu_indentation}knetbsd "${path}"
+${submenu_indentation}}
+EOF
+fi
+
+if [ "x${multiple_memtest}" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xy ]; then
cat <<EOF
- knetbsd "${path}"
}
EOF
fi
diff --git a/sys-apps/memtest86+/memtest86+-4.20-r2.ebuild b/sys-apps/memtest86+/memtest86+-4.20-r3.ebuild
index 06dac9cca1e..07f4158b080 100644
--- a/sys-apps/memtest86+/memtest86+-4.20-r2.ebuild
+++ b/sys-apps/memtest86+/memtest86+-4.20-r3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
diff --git a/sys-apps/memtest86+/memtest86+-5.01-r1.ebuild b/sys-apps/memtest86+/memtest86+-5.01-r2.ebuild
index 6186228b89c..7d3372c82c5 100644
--- a/sys-apps/memtest86+/memtest86+-5.01-r1.ebuild
+++ b/sys-apps/memtest86+/memtest86+-5.01-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$