Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Sep 2012 23:38:38 -0400
From:      Glen Barber <gjb@FreeBSD.org>
To:        rc@FreeBSD.org
Subject:   Standardizing our configuration sanity command in rc(8)
Message-ID:  <20120905033838.GE1333@glenbarber.us>

next in thread | raw e-mail | index | archive | help

--hUH5gZbnpyIv7Mn4
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

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.


--hUH5gZbnpyIv7Mn4
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (FreeBSD)

iQEcBAEBCAAGBQJQRsk+AAoJEFJPDDeguUaj1VQH/jyI9BXuz34hVUfHpK8YrLUQ
wz8WUO4AJEh16UY2VmUvBfo6jtwogqsaQEaV+CJ1GHQ8a3gPsAOcFE+DKYqq4VO5
QQ3SsEFHwBziOOIEY8+8LMqqPakkN60r+srUy96edn9x7qmcXOXmPTkV61mDleWs
0KnPe24cLlRwR2JHnTA8qd3oxkb+PKiA3v8c9/ssS2xofQt8QUNqCWhaFuT7VE4o
s+eCQKXKhUnqHn1YmZZp3vi3dWRWoglW/lL3sQ3Xrblr/p2l7SZ+9B66V8W/Cu0K
N9PTQaY+fyRpc5j/+2DnAGoOWGQd0xGRXBb9RmGyYfKRlZ+5go3ixtS4dp7N+cw=
=KFSF
-----END PGP SIGNATURE-----

--hUH5gZbnpyIv7Mn4--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120905033838.GE1333>