Subject: Re: Bug#3290: sysvinit path doesn't include /usr/local/{,s}bin

From: Ian Jackson <[email-masked]>
Date: Mon, 8 Jul 96 02:34 BST

Miquel van Smoorenburg writes ("Re: Bug#3290: sysvinit path doesn't include /usr/local/{,s}bin"):
...
> Okay. I'll try to explain it one more time, I might not have been clear
> enough and re-reading this thread I've also posted some mis-information
> unintentionally.
> 
> The PATH set in /etc/init.d/boot is only used in that script; remember that
> you cannot modify the parents environment. If you want to change the
> behavour of this script by simply putting binaries in /usr/local/sbin that
> override the default binaries that won't work. An example with a custom
> mount was given; but how do use use /usr/local/sbin/mount when /usr isn't
> mounted yet ;) You'll have to edit the script anyway.

But this *will* work if the system administrator sets their system up
so that /usr/local is on the root fs, for example.

> So modifying the PATH in /etc/init.d/boot doesn't influence any other part of
> the system. On the other hand; you might want to change the PATH in
> the /etc/init/rc script, that's the one that executes all other scripts
> in /etc/init.d/.... However that still doesn't influence programs that
> are started directly by init, such as sulogin in single user mode.
> 
> The only solution seems to be to change the PATH hardcoded in the init binary
> itself. This is ofcourse a bit hard to do. Therefor init has another solution;
> you can let all programs executed by init go through a script called
> /etc/initscript. See the manpage: initscript(8). This is turned off by default,
> and for a good reason: it spawns an extra shell for everything executed
> by init.

The PATH used by init should include /usr/local/bin too.  Doesn't it ?

Programs run directly by init need to have the right environment too.

Ian.