From: Robert Millan <rmh@aybabtu.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: Idea: use menu hook to implement the savedefault command
Date: Tue, 12 Aug 2008 10:52:13 +0200 [thread overview]
Message-ID: <20080812085213.GA381@thorin> (raw)
In-Reply-To: <ca0f59980808111827m46c952c0t35f87e773de8ad32@mail.gmail.com>
On Tue, Aug 12, 2008 at 09:27:42AM +0800, Bean wrote:
> On Tue, Aug 12, 2008 at 5:32 AM, Robert Millan <rmh@aybabtu.com> wrote:
> > On Tue, Aug 12, 2008 at 05:03:10AM +0800, Bean wrote:
> >> Hi,
> >>
> >> Now it's possible to implement savedefault with load_env and save_env,
> >> but the problem is we need to add it to every menuitem, it's tedious
> >> process, and new item don't get it automatically.
> >
> > After discussing this on IRC, I just thought of another alternative. We
> > could add a pair of functions to update-grub_lib, like:
> >
> > begin_menuentry ()
> > {
> > title=$1
> > echo "menuentry \"$title\" {"
> > echo "do some env-edit magic"
> > }
> >
> > end_menuentry ()
> > {
> > echo "}"
> > }
> >
> > then have each of the /etc/grub.d modules that add menuentries use these
> > functions instead of creating the menuentry directly.
> >
> > As a side-effect benefit, the /etc/grub.d modules become a bit more
> > readable.
>
> Hi,
>
> Oh right, if you can do it in update-grub, it's probably better to do
> it there.
Ok, I'll see about that.
> The above post also contain some idea about the
> implementation of password command, perhaps I post a seperate post for
> it.
Notice there's already an implementation of a lock command:
http://www.mail-archive.com/grub-devel@gnu.org/msg05350.html
which, I think, even without password it would satisfy most of the users who
want lock/password. I recommend you read that thread before venturing into
implement it (Okuji didn't like my initial proposal, and I run out of time
to find/implement another approach).
--
Robert Millan
The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
how) you may access your data; but nobody's threatening your freedom: we
still allow you to remove your data and not access it at all."
next prev parent reply other threads:[~2008-08-12 8:53 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-11 21:03 Idea: use menu hook to implement the savedefault command Bean
2008-08-11 21:32 ` Robert Millan
2008-08-12 1:27 ` Bean
2008-08-12 8:52 ` Robert Millan [this message]
2008-08-12 9:38 ` Bean
2008-08-12 10:15 ` Robert Millan
2008-08-12 10:38 ` Bean
2008-08-12 10:44 ` Robert Millan
2008-08-12 10:52 ` Bean
2008-08-13 10:31 ` Marco Gerards
2008-08-13 11:36 ` Javier Martín
2008-08-13 11:48 ` Robert Millan
2008-08-13 12:11 ` Javier Martín
2008-08-13 12:38 ` Robert Millan
-- strict thread matches above, loose matches on Subject: below --
2008-08-11 21:02 Bean
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=20080812085213.GA381@thorin \
--to=rmh@aybabtu.com \
--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.