tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: rc.d environment inheritance
On Mon, Mar 16, 2009 at 08:15:30AM +0000, Roy Marples wrote:
> You missed the point :)
> The full path to the daemon the rc.d script called is hard coded.
> However the daemon itself wants to call something in $PATH.
In general daemons need to set $PATH and assorted other environment
variables themselves, because it isn't safe or portable to count on
getting a useful (or even consistent) environment from /etc/rc or
inetd or cron.
However, since we aren't HP-UX (or Red Hat) and like to be able to
claim we ship a working system, we ought to provide a useful
environment, which includes a correct $PATH.
> One might argue that the daemon in pkgsrc should be patched to use the
> hardcoded path, but what if the daemon is in base and can optionally use
> a pkgsrc supplied program?
...and this is why the order should always be /usr/local, /usr/pkg,
then /usr. If you install something with the same name as something in
base, it's because you want to use it instead of the version from base,
not so it can sit around taking up disk space without being used.
--
David A. Holland
dholland%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index