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: [PATCH] Save/Load environment variable support
Date: Thu, 03 Jul 2008 14:09:40 -0400	[thread overview]
Message-ID: <1215108580.4585.11.camel@dv> (raw)
In-Reply-To: <877ic27skd.fsf@xs4all.nl>

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



  reply	other threads:[~2008-07-03 18:09 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-13  7:07 [PATCH] Save/Load environment variable support Bean
2008-06-14 18:47 ` Robert Millan
2008-06-14 19:03   ` Bean
2008-06-14 19:20     ` Robert Millan
2008-06-14 19:28       ` Bean
2008-06-14 19:30 ` Robert Millan
2008-06-14 19:44   ` Bean
2008-06-15 13:25     ` Robert Millan
2008-06-15 14:09       ` Bean
2008-06-30 13:06         ` Bean
2008-07-01 15:54           ` Robert Millan
2008-07-02  7:39             ` Bean
2008-07-03 18:04               ` Marco Gerards
2008-07-03 18:09                 ` Pavel Roskin [this message]
2008-07-03 20:11                   ` Bean
2008-07-03 22:52                     ` Robert Millan
2008-07-03 20:41                   ` Marco Gerards
2008-07-03 21:06                     ` 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=1215108580.4585.11.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.