From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KETFa-0007OM-Pi for mharc-grub-devel@gnu.org; Thu, 03 Jul 2008 14:09:46 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KETFY-0007Nj-MB for grub-devel@gnu.org; Thu, 03 Jul 2008 14:09:44 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KETFX-0007NO-DZ for grub-devel@gnu.org; Thu, 03 Jul 2008 14:09:44 -0400 Received: from [199.232.76.173] (port=46905 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KETFX-0007NF-1c for grub-devel@gnu.org; Thu, 03 Jul 2008 14:09:43 -0400 Received: from c60.cesmail.net ([216.154.195.49]:18719) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.60) (envelope-from ) id 1KETFW-00016q-Na for grub-devel@gnu.org; Thu, 03 Jul 2008 14:09:42 -0400 Received: from unknown (HELO relay.cesmail.net) ([192.168.1.81]) by c60.cesmail.net with ESMTP; 03 Jul 2008 14:09:41 -0400 Received: from [192.168.0.21] (static-72-92-88-10.phlapa.fios.verizon.net [72.92.88.10]) by relay.cesmail.net (Postfix) with ESMTP id 47A72618F22 for ; Thu, 3 Jul 2008 14:09:41 -0400 (EDT) From: Pavel Roskin To: The development of GRUB 2 In-Reply-To: <877ic27skd.fsf@xs4all.nl> References: <20080614193028.GB840@thorin> <20080615132552.GA17222@thorin> <20080701155427.GA6985@thorin> <877ic27skd.fsf@xs4all.nl> Content-Type: text/plain Date: Thu, 03 Jul 2008 14:09:40 -0400 Message-Id: <1215108580.4585.11.camel@dv> Mime-Version: 1.0 X-Mailer: Evolution 2.22.2 (2.22.2-2.fc9) Content-Transfer-Encoding: 7bit X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: [PATCH] Save/Load environment variable support 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: Thu, 03 Jul 2008 18:09:44 -0000 On Thu, 2008-07-03 at 20:04 +0200, Marco Gerards wrote: > Great! Can you explain how it works? Very good question. It's not "discoverable". I could not find way to figure out that /boot/grub/grubenv is the default without looking at the code. load_env without arguments merely prints "error: file not found" without telling which file it needs. Help texts are silent about the defaults. Many commands ignore extra arguments silently. The whole code needs a serious cleanup with end users in mind. We also have too many commands regarding environment. There is even freebsd_loadenv, which should probably merged with load_env somehow. Or maybe not. Maybe all native environment files should be handled with one command, such as "env". We also need mechanisms to implement "savedefault" functionality, perhaps with easy examples. Maybe update-grub should use it. Anyway, to start using it, create the environment file: grub-editenv (by the way, grub-env would be a better name): grub-editenv /boot/grub/grubenv create grub-editenv /boot/grub/grubenv set foo=bar Now you can inspect it with "list_env", load it into environment with "load_env" and save variables into it with "save_env". -- Regards, Pavel Roskin