From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JQxJG-0003FZ-D6 for mharc-grub-devel@gnu.org; Sun, 17 Feb 2008 23:08:54 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JQxJE-0003Ep-Pt for grub-devel@gnu.org; Sun, 17 Feb 2008 23:08:52 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JQxJD-0003EF-Qx for grub-devel@gnu.org; Sun, 17 Feb 2008 23:08:52 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JQxJD-0003E9-IM for grub-devel@gnu.org; Sun, 17 Feb 2008 23:08:51 -0500 Received: from c60.cesmail.net ([216.154.195.49]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.60) (envelope-from ) id 1JQxJD-0007e0-1a for grub-devel@gnu.org; Sun, 17 Feb 2008 23:08:51 -0500 Received: from unknown (HELO relay.cesmail.net) ([192.168.1.81]) by c60.cesmail.net with ESMTP; 17 Feb 2008 23:08:50 -0500 Received: from [192.168.1.21] (static-72-92-88-10.phlapa.fios.verizon.net [72.92.88.10]) by relay.cesmail.net (Postfix) with ESMTP id E232A619058 for ; Sun, 17 Feb 2008 23:08:49 -0500 (EST) From: Pavel Roskin To: The development of GRUB 2 In-Reply-To: <20080213155621.GD30040@thorin> References: <1202805123.5459.23.camel@solid.paris.klabs.be> <20080212114709.GC19144@thorin> <1202856910.20992.30.camel@dv> <20080213155621.GD30040@thorin> Content-Type: text/plain Date: Sun, 17 Feb 2008 23:08:49 -0500 Message-Id: <1203307729.5773.8.camel@dv> Mime-Version: 1.0 X-Mailer: Evolution 2.12.3 (2.12.3-1.fc8) Content-Transfer-Encoding: 7bit X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: comments about /etc/default/grub X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2008 04:08:53 -0000 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