-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 23.12.2015 07:58, Andrei Borzenkov wrote: > On Tue, Dec 22, 2015 at 6:19 PM, Robin Schneider <[email protected]> wrote: >> 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 >> > > That's overcomplicated. The first class found wins and you will not define > them unless you have them. So just having > > class="$GRUB_..._CLASS --class ..." > > is really enough.
Thanks for the input. I agree that my first patch was probably a bit to flexible. I attached a updated patch. > >> Let me know what you think. >> > > I'm not sure I like turning grub-mkconfig into kitchen sink, but yes, that > probably makes sense. It allows easy vendor-specific icons without need to > patch grub every time. > >> -CLASS="--class gnu-linux --class gnu --class os --class xen" > > I guess "--class xen" should be in front as most specific (unrelated to > your patch). > > I have half baked patch lying around that tries to use more sensible icons > in os-prober as well. May be it's time to revisit it. - -- Live long and prosper Robin `ypid` Schneider -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJWewoKAAoJEIb9mAu/GkD4tJoQAMtvZcUGrksI0VtCVOJvibrr 2/NN2B2191blBIgi9HffciLUDaI3zX1g3dWwhXh0PYLdMmxyfbR3ewK/bzHWN9gg amCGsyPPbaWBpsE6c2jhLDqFX+on67DCCXiCS4QJX+u31ZwRbZhqhekAvZxvH00W pju/2WEMQv4CA15lBvBYB/y6Sux1sNyl/4jdC5ZvtAgsNAj+Z1ADebSsi7G+ym48 N1gbjgFOR1p4ORfSKjhHvGAfJ/8JaNatphp1BMYJImozy/ktZC+vbr+7N/tc/LW2 XWxpi3drKM2x8kZerGA4vITVjTxWZyrkQtErRQPROE6r+NxoqUotzny7y2KSZtCB 3ncEn10sA360o5TLnY5WCqrN7XbLh73T/g7ePWCumy/IIKAY9oPuxzFI/vLElzDf QBAhL/G7GYTRJX5nwRVbeMwwhcx+UrxllSSLswcLZCCpfO2XQXDSjlZiGVfvoRMS oxmF/kQ5GD2X3Chs33gX4cPCE4NPf1xdg0mQEnpx8e3RcdaLR5kki8p8mi97ME+j LyMJDUZsbnrz0ylljdieDJWHnHFLrRuj4Qksn0bWUTG/+1zSSX66rzGVzP9/pwKv /3JkN2D7q3aTBcBts9BzeJgomi1iJtDsbd03ve1SiTX9iUH+6lylToxtuCT3T4jX SF0yyzjjewj7idRFrhH6 =JF0U -----END PGP SIGNATURE-----
>From c8a8c9901837f4d4217507cf82a754b99111e721 Mon Sep 17 00:00:00 2001 From: Robin Schneider <[email protected]> Date: Wed, 23 Dec 2015 17:23:42 +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 | 7 ++++++- 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, 11 insertions(+), 6 deletions(-) diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in index 3183744..3f5468c 100644 --- a/util/grub-mkconfig.in +++ b/util/grub-mkconfig.in @@ -227,7 +227,12 @@ export GRUB_DEFAULT \ GRUB_ENABLE_CRYPTODISK \ GRUB_BADRAM \ GRUB_OS_PROBER_SKIP_LIST \ - GRUB_DISABLE_SUBMENU + GRUB_DISABLE_SUBMENU \ + GRUB_LINUX_MENUENTRY_CLASS \ + GRUB_XEN_MENUENTRY_CLASS \ + GRUB_HURD_MENUENTRY_CLASS \ + GRUB_ILLUMOS_MENUENTRY_CLASS \ + GRUB_KFREEBSD_MENUENTRY_CLASS 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..9c3ba8e 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" 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..db85554 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" case "${GRUB_DISTRIBUTOR}" in *) diff --git a/util/grub.d/10_kfreebsd.in b/util/grub.d/10_kfreebsd.in index 9d8e8fd..fb9f4b0 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" case "${GRUB_DISTRIBUTOR}" in Debian) diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in index 859b608..266158b 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" 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..80d0f9b 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" if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then OS=GNU/Linux -- 2.1.4
0001-Allow-to-add-change-menu-entry-class-defaults.patch.sig
Description: PGP signature
_______________________________________________ Grub-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/grub-devel
