From owner-freebsd-rc@FreeBSD.ORG Wed Sep 5 03:38:47 2012 Return-Path: Delivered-To: rc@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 763171065673; Wed, 5 Sep 2012 03:38:47 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from onyx.glenbarber.us (onyx.glenbarber.us [IPv6:2607:fc50:1000:c200::face]) by mx1.freebsd.org (Postfix) with ESMTP id 227528FC0A; Wed, 5 Sep 2012 03:38:44 +0000 (UTC) Received: from glenbarber.us (unknown [IPv6:2001:470:8:1205:2:2:0:100]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: gjb) by onyx.glenbarber.us (Postfix) with ESMTPSA id DD59823F645; Tue, 4 Sep 2012 23:38:42 -0400 (EDT) Date: Tue, 4 Sep 2012 23:38:38 -0400 From: Glen Barber To: rc@FreeBSD.org Message-ID: <20120905033838.GE1333@glenbarber.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="hUH5gZbnpyIv7Mn4" Content-Disposition: inline X-Operating-System: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Subject: Standardizing our configuration sanity command in rc(8) X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Sep 2012 03:38:47 -0000 --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--