On 2018-10-28 16:58 +0000, Grzesiek Sójka wrote: > On 10/28/18 2:10 PM, Sven Joachim wrote: >> Wouldn't it be better to fix the init system that sets such a bad >> default PATH? Whatever init system that may be - sysv-rc's >> /etc/init.d/rc script sets PATH=/sbin:/usr/sbin:/bin:/usr/bin, so this >> should not happen with sysvinit + sysv-rc. > > Please, keep in mind that /etc/init.d/rpcbind may also be invoked by > /etc/network/if-up.d/mountnfs (after bringing up interfaces): > > # grep PATH /etc/network/if-up.d/mountnfs > PATH=/sbin:/bin
I see. This could be fixed in ifupdown by not setting PATH in its init scripts or by setting PATH in the rpcbind init script. Overall PATH handling in init scripts is a total mess and needs to be cleaned up. These days /usr is supposed to be mounted by the initramfs if it's on a different filesystem than /, so init scripts can rely on it being present. Please file a bug - most maintainers use systemd these days where those problems do not exist, so they won't notice them. Cheers, Sven