LFS-Bootscripts-2.2.0-pre2 released

Kevin P. Fleming kpfleming at linuxfromscratch.org
Sun Jul 11 19:52:07 PDT 2004

Bryan Kadzban wrote:

> There is one minor thing though -- in init.d/network, when bringing the
> network down, it seems Nathan switched from [ -f "$file" -a <stuff> ]
> (which is what he used when bringing it up) to [ -r "$file" -a <stuff>
> ].  I assume they should both be the same, right Nathan?

Yes, they should both be -f.

> Shouldn't this be echoing "$file was not a file"?  Or should the test be
> using -r instead?

-r does not do anything useful in this context, because this script will 
(nearly always) be run as root. root can always read any file, so -r and 
-f return the same results (as does -w). Only -x has meaning for 
checking permissions bits for root.

I would agree that the message would be better changed to something that 
just says it was not a file when it should have been, as you have suggested.

More information about the lfs-dev mailing list