rc init path question

Brooks Davis brooks at one-eyed-alien.net
Mon Aug 15 18:35:11 GMT 2005


On Mon, Aug 15, 2005 at 11:26:17AM -0600, Ken Gunderson wrote:
> 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.

The script should use /usr/local/bin/lnyx in that case.  Actually, it
should use %%LOCALBASE%%/bin/lnyx and have LOCALBASE be set by the port
installation porcess.

-- Brooks

-- 
Any statement of the form "X is the one, true Y" is FALSE.
PGP fingerprint 655D 519C 26A7 82E7 2529  9BF0 5D8E 8BE9 F238 1AD4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-amd64/attachments/20050815/b10be7b6/attachment.bin


More information about the freebsd-amd64 mailing list