[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Special requirements for scripts in /etc/rcS.d?



On Mon, Nov 03, 2003 at 05:45:31PM +0100, Frank Küster wrote:
> Steve Langasek <vorlon@netexpress.net> schrieb:

> >> As I don't use nfs at all, I don't know how to figure this out safely
> >> during configure. Can you point me to the right place?

> > Can you explain in more detail how the call to 'stat' is being used?  Is
> > it not possible to detect, at runtime, if the stat binary is missing,
> > and compensate appropriately by falling back to earlier behavior?

> stat is called to get uid and exact permissions of a temporary
> configuration file which has just been created. Of course it is no
> problem to check for stat's existence and act appropriately if it isn't
> there. So my statement "cannot be used" is in fact only true for the
> current version which doesn't do any check. 

> However, I would still be interested if there's a simple method for a
> script to find out which directories/partitions will be mounted when.

You could look for 'nfs' in /etc/fstab, but that's overly cumbersome,
and doesn't allow your init script to do what you really want it to do
-- namely, cope with different filesystem policies even on systems where
these policies might change over time.

Dynamically checking for the presence of /usr/bin/stat is the best
defense here, IMHO.

-- 
Steve Langasek
postmodern programmer

Attachment: pgpD7VjPW40Lp.pgp
Description: PGP signature


Reply to: