From: Robin Schneider <ypid@riseup.net>
To: grub-devel@gnu.org
Subject: [PATCH] Allow to add/change menu entry class defaults.
Date: Tue, 22 Dec 2015 16:19:07 +0100 [thread overview]
Message-ID: <567969EB.1090109@riseup.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 1130 bytes --]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Useful for changing the default access level for menu entries when using
GRUBs password protection feature.
Ansible role which makes use of this patch:
https://github.com/debops/ansible-grub/pull/7
Let me know what you think.
- --
Live long and prosper
Robin `ypid` Schneider
-----BEGIN PGP SIGNATURE-----
iQIcBAEBCgAGBQJWeWnqAAoJEIb9mAu/GkD4VG4P/2b7pozgh8MCGJs+5W5tB2Ix
JdNMnMi+txhVrSDUX2e0ILQkQk6+dVGAP5Lz3IyHtuJFogqdxYx+v5N/o31aAm6l
obSCzbgf5DhKxig00Me/8rT6tpGllULqIeKge7gduxNIy9qT5lsSqdD8qvtRf+Mv
Ak3KxOYH/smNVXBV2EuoqRHFE20GkDjUeW4ECgoB7k6kkVSBHikwo8cbzDSXnOqs
aJlx7vI/Ztpud8qYyJQbV6S+ezcHOeMViydLkd7UmPxJysULjUQJ5vYOsXQKiUW+
o97/xvXLzrMO3XXbJEub9utJYMqvsug1I9fzdPlJ+TmPVxGT9Cuw1RY3a/W60jXX
Vg8mu2DaZZeUP9U7BqrpAeKA0Rj/WEiYq++V11n7vx1MwvSRdXRtftGabKCTGSHq
a1IobHu3ojcbCj/q3V1c+N6SLGAWvzaSlcJurAKpNGGaxj628MvU9kYsqwImPxEW
mToRs0CEu7HS0+kQa3doSpArV1mC0tAb0MtEAQ/OZtfxMdGfgC1LSXwk6hWPi26x
4/bMeUr7eJzN9uSta5xUSW+7n4ooa7LN8sxY9DkQT3glWyUyZCPVwbXmI96nWZ8J
owMFvrU3tIV5llEpZ9sg1YUFKYkrpDffdRN5Qsnzm8gL72urPJ4B7S12c9rmut8p
1bU5G+0z+hM0/DBdVWTE
=bJj/
-----END PGP SIGNATURE-----
[-- Attachment #2: 0001-Allow-to-add-change-menu-entry-class-defaults.patch --]
[-- Type: text/x-patch, Size: 3813 bytes --]
From f769c045f246859224fbf0037a5617cdf4de35bb Mon Sep 17 00:00:00 2001
From: Robin Schneider <ypid@riseup.net>
Date: Tue, 22 Dec 2015 16:11:13 +0100
Subject: [PATCH] Allow to add/change menu entry class defaults.
Useful for changing the default access level for menu entries when using
GRUBs password protection feature.
Ansible role which makes use of this patch:
https://github.com/debops/ansible-grub/pull/7
---
util/grub-mkconfig.in | 12 +++++++++++-
util/grub.d/10_hurd.in | 2 +-
util/grub.d/10_illumos.in | 2 +-
util/grub.d/10_kfreebsd.in | 2 +-
util/grub.d/10_linux.in | 2 +-
util/grub.d/20_linux_xen.in | 2 +-
6 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
index 3183744..56a88e2 100644
--- a/util/grub-mkconfig.in
+++ b/util/grub-mkconfig.in
@@ -227,7 +227,17 @@ export GRUB_DEFAULT \
GRUB_ENABLE_CRYPTODISK \
GRUB_BADRAM \
GRUB_OS_PROBER_SKIP_LIST \
- GRUB_DISABLE_SUBMENU
+ GRUB_DISABLE_SUBMENU \
+ GRUB_LINUX_MENUENTRY_CLASS \
+ GRUB_LINUX_MENUENTRY_CLASS_ADDITIONAL \
+ GRUB_XEN_MENUENTRY_CLASS \
+ GRUB_XEN_MENUENTRY_CLASS_ADDITIONAL \
+ GRUB_HURD_MENUENTRY_CLASS \
+ GRUB_HURD_MENUENTRY_CLASS_ADDITIONAL \
+ GRUB_ILLUMOS_MENUENTRY_CLASS \
+ GRUB_ILLUMOS_MENUENTRY_CLASS_ADDITIONAL \
+ GRUB_KFREEBSD_MENUENTRY_CLASS \
+ GRUB_KFREEBSD_MENUENTRY_CLASS_ADDITIONAL
if test "x${grub_cfg}" != "x"; then
rm -f "${grub_cfg}.new"
diff --git a/util/grub.d/10_hurd.in b/util/grub.d/10_hurd.in
index 59a9a48..4b31d11 100644
--- a/util/grub.d/10_hurd.in
+++ b/util/grub.d/10_hurd.in
@@ -26,7 +26,7 @@ export TEXTDOMAINDIR="@localedir@"
. "$pkgdatadir/grub-mkconfig_lib"
-CLASS="--class gnu --class os"
+CLASS=${GRUB_HURD_MENUENTRY_CLASS:-"--class gnu --class os ${GRUB_HURD_MENUENTRY_CLASS_ADDITIONAL:-}"}
if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
OS=GNU
diff --git a/util/grub.d/10_illumos.in b/util/grub.d/10_illumos.in
index a133e1b..0f62a24 100644
--- a/util/grub.d/10_illumos.in
+++ b/util/grub.d/10_illumos.in
@@ -25,7 +25,7 @@ datarootdir="@datarootdir@"
export TEXTDOMAIN=@PACKAGE@
export TEXTDOMAINDIR="@localedir@"
-CLASS="--class os"
+CLASS=${GRUB_ILLUMOS_MENUENTRY_CLASS:-"--class os ${GRUB_ILLUMOS_MENUENTRY_CLASS_ADDITIONAL:-}"}
case "${GRUB_DISTRIBUTOR}" in
*)
diff --git a/util/grub.d/10_kfreebsd.in b/util/grub.d/10_kfreebsd.in
index 9d8e8fd..773d151 100644
--- a/util/grub.d/10_kfreebsd.in
+++ b/util/grub.d/10_kfreebsd.in
@@ -25,7 +25,7 @@ datarootdir="@datarootdir@"
export TEXTDOMAIN=@PACKAGE@
export TEXTDOMAINDIR="@localedir@"
-CLASS="--class os"
+CLASS=${GRUB_KFREEBSD_MENUENTRY_CLASS:-"--class os ${GRUB_KFREEBSD_MENUENTRY_CLASS_ADDITIONAL:-}"}
case "${GRUB_DISTRIBUTOR}" in
Debian)
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
index 859b608..18fb521 100644
--- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in
@@ -26,7 +26,7 @@ datarootdir="@datarootdir@"
export TEXTDOMAIN=@PACKAGE@
export TEXTDOMAINDIR="@localedir@"
-CLASS="--class gnu-linux --class gnu --class os"
+CLASS=${GRUB_LINUX_MENUENTRY_CLASS:-"--class gnu-linux --class gnu --class os ${GRUB_LINUX_MENUENTRY_CLASS_ADDITIONAL:-}"}
if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
OS=GNU/Linux
diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
index f532fb9..fcc8cf9 100644
--- a/util/grub.d/20_linux_xen.in
+++ b/util/grub.d/20_linux_xen.in
@@ -26,7 +26,7 @@ datarootdir="@datarootdir@"
export TEXTDOMAIN=@PACKAGE@
export TEXTDOMAINDIR="@localedir@"
-CLASS="--class gnu-linux --class gnu --class os --class xen"
+CLASS=${GRUB_XEN_MENUENTRY_CLASS:-"--class gnu-linux --class gnu --class os --class xen ${GRUB_XEN_MENUENTRY_CLASS_ADDITIONAL:-}"}
if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
OS=GNU/Linux
--
2.1.4
[-- Attachment #3: 0001-Allow-to-add-change-menu-entry-class-defaults.patch.sig --]
[-- Type: application/pgp-signature, Size: 543 bytes --]
next reply other threads:[~2015-12-22 15:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-22 15:19 Robin Schneider [this message]
2015-12-23 6:58 ` [PATCH] Allow to add/change menu entry class defaults Andrei Borzenkov
2015-12-23 20:54 ` Robin Schneider
2015-12-24 8:21 ` Andrei Borzenkov
2015-12-26 21:17 ` Robin Schneider
2015-12-27 17:03 ` Andrei Borzenkov
2015-12-27 20:44 ` Robin Schneider
2016-01-13 12:12 ` Robin Schneider
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=567969EB.1090109@riseup.net \
--to=ypid@riseup.net \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.