[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 10:34:59AM +0100, Frank Küster wrote:
> Paul Cupis <paul@cupis.co.uk> schrieb:

> > On Sunday 02 November 2003 19:30, frank@kuesterei.ch (Frank Küster) 
> > wrote:
> >> I have become the (sponsored) maintainer of netenv, a package that
> >> creates a link to it's /etc/init.d/ file in /etc/rcS.d/. Up to
> >> recently, it was only depending on stuff in /bin and /sbin. However,
> >> as the result of a bug report I have introduced a call to
> >> /usr/bin/stat.
> >>
> >> Now I wonder wether this is correct? I couldn't find anything in the
> >> policy, but wanted to be sure: Is it required that scripts in
> >> /etc/rcS.d can be cleanly executed even if only / has been mounted,
> >> not /usr/?
> >
> > When exactly does the script run? According to /etc/rcS.d/README, after 
> > S60 all local and NFS filesystems should have been mounted.

> Thank you for pointing me to that. In fact it's started as
> /etc/rcS.d/S40netenv, because it is needed before
> /etc/rcS.d/S40networking. 

> This means:

> - netenv (as it currently is, using /usr/bin/stat) cannot be used on a
>   system that has /usr on an nfs filesystem 

> - anybody who reasonably wants to use netenv, a program for laptops or
>   other portables, will have /usr mounted locally

> - still I have to think about a way to prevent harm when somebody
>   accidently installs it on a machine using nfs for /usr.

> 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?

-- 
Steve Langasek
postmodern programmer

Attachment: pgp2UyfhgH52C.pgp
Description: PGP signature


Reply to: