grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Save/Load environment variable support


From: Pavel Roskin
Subject: Re: [PATCH] Save/Load environment variable support
Date: Thu, 03 Jul 2008 14:09:40 -0400

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 via email to

[Prev in Thread] Current Thread [Next in Thread]