At Mon, 26 May 2025 16:18:38 +0200, Edgar Fuß <ef%math.uni-bonn.de@localhost> wrote:
Subject: run_rc_command succeeds if command not executable
>
> I wondered why mdnsd didn't start on boot without any trace in rc.log.
>
> Now I found out it's /usr missing in critical_filesystems_local, but why
> on earth does run_rc_command() do
> if [ ! -x ${_chroot}${command} ]; then
> return 0
> fi
> so this is silently ignored?
I wonder!
My guess is that it is to support a simple alternative way turning off
something by simply removing its execute bit.
In my local copy I added a "warn" message to this and an awful lot of
other similar cases where something is silently ignored or causes a
silent error of some sort.
I see that it has been this way right from the beginning, early 2000,
when that test was added at the time the run_rc_command function itself
was first added to rc.subr (1.11) (and the running of everything was
moved from /etc/rc to /etc/rc.d/*).
--
Greg A. Woods <gwoods%acm.org@localhost>
Kelowna, BC +1 250 762-7675 RoboHack <woods%robohack.ca@localhost>
Planix, Inc. <woods%planix.com@localhost> Avoncote Farms <woods%avoncote.ca@localhost>
Attachment:
pgphN7ccDKCbt.pgp
Description: OpenPGP Digital Signature