Standardizing our configuration sanity command in rc(8)

Glen Barber gjb at FreeBSD.org
Wed Sep 5 03:38:47 UTC 2012


Hi,

I see some inconsistency in the rc(8) system that I feel may be
confusing to users, specifically with what would intuitively be the
correct command to issue to validate the sanity of a configuration file
(where the underlying program supports it).

Over the years, and I admittedly had not paid too much attention to it
until recently, it seems 'configtest' has been the de-facto for
validating a configuration file before (or during) a service restart.

A few examples would be:

 - www/nginx
 - www/apache22
 - www/lighttpd
 - mail/rspamd

But, then we also have the 'checkconfig' command, which as far as I can
tell, does the same thing.

But, nonetheless, it is a different command to issue.

While, yes, the "correct" command to issue is in the rc(8) script, and
can also be found by issuing the incorrect command, isn't it about time
we standardize the practice here?

I think this convention should first be defined for the base system for
programs that support it, such as sshd(8)* and pfctl(8)**.

So, thoughts?

Glen

* Since r240109, the sshd rc script supports 'service sshd configtest',
  with a few fixes pending.

** As a FreeBSD user of around 10 years, I just now noticed the pfctl rc
  script does, in fact, have a 'configtest' - called 'check'.  Check
  what?  I have a config?  I have .. pf(4) loaded?  My fault for not
  looking at the rc script sooner, but that intuitive command
  consistency would be handy in such cases.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-rc/attachments/20120905/f5a3c50f/attachment.pgp


More information about the freebsd-rc mailing list