All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Roskin <proski@gnu.org>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: comments about /etc/default/grub
Date: Sun, 17 Feb 2008 23:08:49 -0500	[thread overview]
Message-ID: <1203307729.5773.8.camel@dv> (raw)
In-Reply-To: <20080213155621.GD30040@thorin>

On Wed, 2008-02-13 at 16:56 +0100, Robert Millan wrote:
> On Tue, Feb 12, 2008 at 05:55:10PM -0500, Pavel Roskin wrote:
> > 
> > Let's use the same grub.d (in /usr/local/etc for local install and
> > in /etc for system install).  What we need is a site template and a
> > vendor template.
> > 
> > I think the templates should be sourced before 00_header.  Maybe the
> > numbers should be shifted, so that we have 10_site, 20_vendor, 30_header
> > etc and still have gaps for more stuff.  Or the templates should have a
> > distinctive suffix.
> 
> That would require some redesign;  note that the current process is:
> 
>   - update-grub sources /etc/default/grub
>   - update-grub exports a number of predefined variables
>   - update-grub execs every script in /etc/grub.d/
> 
> So right now variables set in /etc/grub.d/00_foo can't be used by
> /etc/grub.d/10_bar.

That's a good point.  Perhaps the templates should have distinctive
names.

> > The assignments should be written like this:
> > 
> > : ${GRUB_CMDLINE_LINUX=foo=bar quux=1}
> 
> What does this do?  It doesn't seem to have effect when GRUB_CMDLINE_LINUX
> is already set.

That's exactly the idea.  I wanted to keep already set variables and go
from the higher priority to the lower, i.e. environment, site template,
vendor template.

But we can probably do standard assignments, process lower priority
first and drop support for the environment.

> > In some cases, appending more stuff would be preferred, but for
> > GRUB_CMDLINE_LINUX, it's better to allow the earlier templates or the
> > environment to cancel the additions.
> 
> How would this work?

If I don't like the value for GRUB_CMDLINE_LINUX in the vendor template,
I can put a different value in the site template.  I can add or remove
parameters at will, knowing that the value in the vendor template would
have no effect.

-- 
Regards,
Pavel Roskin



      reply	other threads:[~2008-02-18  4:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-12  8:32 comments about /etc/default/grub Franklin PIAT
2008-02-12 11:47 ` Robert Millan
2008-02-12 20:54   ` Franklin PIAT
2008-02-12 22:55   ` Pavel Roskin
2008-02-13 15:56     ` Robert Millan
2008-02-18  4:08       ` Pavel Roskin [this message]

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=1203307729.5773.8.camel@dv \
    --to=proski@gnu.org \
    --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.