rc init path question

Ken Gunderson kgunders at teamcool.net
Mon Aug 15 17:26:19 GMT 2005

On Mon, 15 Aug 2005 10:19:57 -0700
Brooks Davis <brooks at one-eyed-alien.net> wrote:

> On Mon, Aug 15, 2005 at 09:24:34AM -0600, Ken Gunderson wrote:
> > Greets:
> > 
> > Not strictly amd64 related but I'm not subsribed to questions so here
> > goes....
> > 
> > Why is PATH set so restrictively (e.g. PATH=/sbin:/bin:/usr/sbin:/usr/
> > bin) by rc init?  Startup scripts in rc.d inherit this and seem to have
> > difficulties finding things upon boot whereas running the script
> > manually works fine since .cshrc has come into play by then.  Or am I
> > totally missing something here.??
> Predictability.  Those directories should in general contain only system
> programs who's behavior should be what we expect.  Adding other
> directories such as /usr/local/bin would complicate matters.  This means
> you have to test slightly more carefully, but using full paths to
> commands is good practice in general, particularly for system startup
> scripts.

Yes indeed, but for example, in the case of something like Zope it needs
to know where to look for things like lnyx, etc. wh/get stashed
in /usr/local/bin.  Adding a path statement to rc.d/zope.sh solves the
problem but it took me a while to figure out why manual starts worked
but not reboots...;-P  Or maybe I should be specifying PATH in
zope.conf in this case.  in any event, I've subsequently also noticed
this in a couple other rc.d scripts.

Thanks for your input.

Best regards,

Ken Gunderson

Q: Because it reverses the logical flow of conversation.
A: Why is putting a reply at the top of the message frowned upon?

More information about the freebsd-amd64 mailing list