tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: rc.d environment inheritance
Roy Marples wrote:
>
> I recently wasted some time over this, so either the documentation needs
> to be improved, or some parity needs to happen with rc.d script
> behaviour at boot and at the console.
>
> Take this snippet from /etc/rc
>
> export HOME=/
> export PATH=/sbin:/bin:/usr/sbin:/usr/bin
> umask 022
>
> The default environment for root has a different HOME and PATH which led
> me on a merry chase working out why it worked fine on the console but
> not at boot - basically I was running a daemon under the impression that
> it would pickup paths for /usr/pkg/sbin and /usr/pkg/bin.
Surely rc(8) should describe the environment it sets up for its scripts.
That said, SOP is to use hard-coded paths in rc.d scripts.
--jkl
Home |
Main Index |
Thread Index |
Old Index