All of lore.kernel.org
 help / color / mirror / Atom feed
* Source, configfile and normal
@ 2012-03-07 23:05 Arbiel Perlacremaz
  2012-03-08  9:33 ` Jordan Uggla
  0 siblings, 1 reply; 2+ messages in thread
From: Arbiel Perlacremaz @ 2012-03-07 23:05 UTC (permalink / raw)
  To: grub-devel

What are the differences between
normal file.cfg
configfile file.cfg

I understand
source file.cfg
to be equivalent to the inclusion into the current file of the file.cfg. 
In particular, variables are not to be exported to be available to 
file.cfg commands.

Am I right ?

Arbiel


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Source, configfile and normal
  2012-03-07 23:05 Source, configfile and normal Arbiel Perlacremaz
@ 2012-03-08  9:33 ` Jordan Uggla
  0 siblings, 0 replies; 2+ messages in thread
From: Jordan Uggla @ 2012-03-08  9:33 UTC (permalink / raw)
  To: The development of GNU GRUB

On Wed, Mar 7, 2012 at 3:05 PM, Arbiel Perlacremaz
<arbiel.perlacremaz@gmail.com> wrote:
> What are the differences between
> normal file.cfg

The command "normal" does not take any arguments. It changes from
rescue mode to normal mode. Normal mode then loads $prefix/grub.cfg
automatically. I'm pretty sure that the only time that a user should
ever run "normal" is documented here:
http://www.gnu.org/software/grub/manual/grub.html#GRUB-only-offers-a-rescue-shell

> configfile file.cfg

All paths in grub are absolute, so it would need to be "configfile
/file.cfg", which would execute file.cfg in a new context *and* create
a new menu. It follows basically the same environment variable
semantics as "bash file.sh" in that only exported variables will be
available to file.cfg, and file.cfg cannot modify the environment
variables of its parent.

>
> I understand
> source file.cfg
> to be equivalent to the inclusion into the current file of the file.cfg. In
> particular, variables are not to be exported to be available to file.cfg
> commands.

Correct, much like "source file.sh" in bash.

>
> Am I right ?
>
> Arbiel
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel

-- 
Jordan Uggla (Jordan_U on irc.freenode.net)


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-03-08  9:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-07 23:05 Source, configfile and normal Arbiel Perlacremaz
2012-03-08  9:33 ` Jordan Uggla

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.