Re: grub.cfg parser still doesn't abort on error

2008-02-03 Thread Robert Millan
On Sun, Feb 03, 2008 at 03:53:42PM +0100, Robert Millan wrote: > On Sun, Feb 03, 2008 at 02:29:55PM +0100, Robert Millan wrote: > > On Sun, Feb 03, 2008 at 09:05:38PM +0800, Bean wrote: > > > > > > if font (xxx)/some-file.pff ; then > > > # graphic mode setting > > > else > > > # text mode set

Re: grub.cfg parser still doesn't abort on error

2008-02-03 Thread Robert Millan
On Sun, Feb 03, 2008 at 02:29:55PM +0100, Robert Millan wrote: > On Sun, Feb 03, 2008 at 09:05:38PM +0800, Bean wrote: > > > > if font (xxx)/some-file.pff ; then > > # graphic mode setting > > else > > # text mode setting > > fi > > > > i think this behavior is consistent with sh, an error co

Re: grub.cfg parser still doesn't abort on error

2008-02-03 Thread Robert Millan
On Sun, Feb 03, 2008 at 09:05:38PM +0800, Bean wrote: > > if font (xxx)/some-file.pff ; then > # graphic mode setting > else > # text mode setting > fi > > i think this behavior is consistent with sh, an error code returned > from command should not cause the script to abort. Urg, part of up

Re: grub.cfg parser still doesn't abort on error

2008-02-03 Thread Yoshinori K. Okuji
On Sunday 03 February 2008 11:55, Robert Millan wrote: > You mean it is intentional? I think it's a bad plan to assume user will > check for error status of each command, specially in situations like > font/gfxterm. It is quite intentional. This behavior is consistent with Bash and GRUB Legacy.

Re: grub.cfg parser still doesn't abort on error

2008-02-03 Thread Bean
On Feb 3, 2008 6:55 PM, Robert Millan <[EMAIL PROTECTED]> wrote: > On Sun, Feb 03, 2008 at 11:05:26AM +0800, Bean wrote: > > > > > Try the following grub.cfg: > > > > > > > > > > cat (memdisk)/non-existant-file > > > > > echo this point should never be reached > > > > > read > > > > > > > > >

Re: grub.cfg parser still doesn't abort on error

2008-02-03 Thread Robert Millan
On Sun, Feb 03, 2008 at 11:05:26AM +0800, Bean wrote: > > > > Try the following grub.cfg: > > > > > > > > cat (memdisk)/non-existant-file > > > > echo this point should never be reached > > > > read > > > > > > > > You'll see that the echo is reached, even if cat returned an error. > > > > >

Re: grub.cfg parser still doesn't abort on error

2008-02-02 Thread Bean
On Feb 3, 2008 5:07 AM, Robert Millan <[EMAIL PROTECTED]> wrote: > On Sat, Feb 02, 2008 at 09:59:57PM +0100, Marco Gerards wrote: > > Robert Millan <[EMAIL PROTECTED]> writes: > > > > > Try the following grub.cfg: > > > > > > cat (memdisk)/non-existant-file > > > echo this point should never be

Re: grub.cfg parser still doesn't abort on error

2008-02-02 Thread Robert Millan
On Sat, Feb 02, 2008 at 09:59:57PM +0100, Marco Gerards wrote: > Robert Millan <[EMAIL PROTECTED]> writes: > > > Try the following grub.cfg: > > > > cat (memdisk)/non-existant-file > > echo this point should never be reached > > read > > > > You'll see that the echo is reached, even if cat r

Re: grub.cfg parser still doesn't abort on error

2008-02-02 Thread Marco Gerards
Robert Millan <[EMAIL PROTECTED]> writes: > Try the following grub.cfg: > > cat (memdisk)/non-existant-file > echo this point should never be reached > read > > You'll see that the echo is reached, even if cat returned an error. > > This becomes much worse when found in situations like: > >

grub.cfg parser still doesn't abort on error

2008-02-02 Thread Robert Millan
Try the following grub.cfg: cat (memdisk)/non-existant-file echo this point should never be reached read You'll see that the echo is reached, even if cat returned an error. This becomes much worse when found in situations like: font (xxx)/some-file.pff terminal gfxterm and the font