Hello Robert, My experience showed me that a 'source' - command is not allowed to fail. In my grub.cfg is a 'source'-command which includes a grub.cfg.gfx. If I delete the grub.cfg.gfx also the grub.cfg is rejected and grub boot's as if there were no grub.cfg at all.
I tested this with GRUB 1.96 By Anreas -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Millan Sent: Saturday, July 12, 2008 4:27 PM To: The development of GRUB 2 Subject: Re: [PATCH] Test for files with ls On Mon, Jul 07, 2008 at 09:46:58AM +0200, Lampersperger Andreas wrote: > Hi, > > I have there a small patch to commands/ls.c, whichs makes the > ls-command return an error for non existing fils (as the bash ls > command). > > With this patch, one can have in the grub.cfg files statements like: > > if ls /boot/grub/grub.cfg.gfx ; then > source /boot/grub/grub.cfg.gfx > fi You don't need this kind of protection. Your script is equivalent to: source /boot/grub/grub.cfg.gfx because commands are (intentionaly) allowed to fail. Is there another use case for your proposed change? (if not, I think it's better not to add it; we don't need to implement every feature in coreutils/bash). -- Robert Millan <GPLv2> I know my rights; I want my phone call! <DRM> What good is a phone call... if you are unable to speak? (as seen on /.) _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
------------------------------------------------------------------------------------------------------- Registergericht: Traunstein / Registry Court: HRB 275 – Sitz / Head Office: Traunreut Aufsichtsratsvorsitzender / Chairman of Supervisory Board: Rainer Burkhard Geschäftsführung / Management Board: Thomas Sesselmann (Vorsitzender / Chairman), Michael Grimm, Rainer Hagl, Matthias Fauser E-Mail Haftungsausschluss / E-Mail Disclaimer: http://www.heidenhain.de/disclaimer
_______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel