Bug#549444: grub-pc: menuentry in if clause causes syntax error

Felix Zielcke fzielcke at z-51.de
Sat Oct 3 13:36:26 UTC 2009


Am Samstag, den 03.10.2009, 14:32 +0200 schrieb Jameson Graef Rollins:
> Package: grub-pc
> Version: 1.97~beta3-1
> Severity: normal
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
> 
> Here is a simple illustration of the problem from the grub shell:
> 
> sh:grub> if true ; then
> sh:> menuentry foo {
> syntax error
> Incorrect command
> syntax error
> sh:grub>
> 
> I can't see any reason why one shouldn't be able to put a menuentry in
> a if clause, so I assume this is a bug.  It would be very good if this
> worked, as it would greatly fascilitate building of on-the-fly
> menuentries.

It's a limitation of the parser/lexer.
Both `if' and `menuentry' are not implemented as normal commands.
Unfortunately I don't have any clue about that part of the code, so I
don't know if this can be fixed in a clean way or not.

With Lua you can create menu entrys too, but it isn't really a solution
because it gets dropped in the Debian package with the next upstream
release.


-- 
Felix Zielcke
Proud Debian Maintainer and GNU GRUB developer






More information about the Pkg-grub-devel mailing list