rc.subr: don't require service to be enabled for `status`
authorDaniel Tameling <tamelingdaniel@gmail.com>
Sat, 1 Jul 2023 08:43:40 +0000 (10:43 +0200)
committerEd Maste <emaste@FreeBSD.org>
Thu, 21 Sep 2023 23:28:40 +0000 (19:28 -0400)
commitba793728a840041e93e38bcbff4a7233dc63b722
tree345c22f02d4b423bbe7b4c0cc1f9eab3f5a44a9e
parent0a22677bce28bc9ad39f219b726b5791852d84ba
rc.subr: don't require service to be enabled for `status`

For a service that sets an rcvar, there is a check whether it has been
enabled before the actual command is executed. If the check fails, one
gets a message to enable it and the returned exit status is 0.
However, this is usually undesirable for the status command, which is
a) supposed to check whether the service is running anyway and
b) returns a non-zero exit code if that is not the case.
Thus, skip the check for the status command.

PR: 272282
Reviewed by: emaste
MFC after: 3 days
libexec/rc/rc.subr