Re: Different PATHs in /etc/rc and /etc/rc.shutdown
- In reply to: Andre Albsmeier : "Different PATHs in /etc/rc and /etc/rc.shutdown"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 15 Mar 2022 11:58:31 UTC
Hi, On 15/03/2022 09:21, Andre Albsmeier wrote: > Today I was bitten by the fact that /etc/rc.shutdown and /etc/rc set different > PATHs (I used a command sitting in /usr/local/sbin w/o specifying its path > and it worked in stop_cmd() but not in start_cmd()): > > /etc/rc.shutdown: PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin > /etc/rc: PATH=/sbin:/bin:/usr/sbin:/usr/bin > > Is there a reason for this? Or should they be made equal? In the latter case > I will file a PR... > > -Andre > It seems it's been like that since 1997: https://cgit.freebsd.org/src/commit/?id=8889c700f314bb2d6fc652ff I'd say that /usr/local/sbin should not be included in the PATH of /etc/rc.shutdown for consistency, but then this behavior is almost 20 year old now. In the end, I'd that /usr/local/sbin should not be there and perhaps it should be gone for FreeBSD 14.0. Best, Mateusz Piotrowski