From owner-freebsd-rc@FreeBSD.ORG Mon Jul 1 21:22:34 2013 Return-Path: Delivered-To: freebsd-rc@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 66B02A30 for ; Mon, 1 Jul 2013 21:22:34 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mail.allbsd.org (gatekeeper.allbsd.org [IPv6:2001:2f0:104:e001::32]) by mx1.freebsd.org (Postfix) with ESMTP id 5445512C8 for ; Mon, 1 Jul 2013 21:22:33 +0000 (UTC) Received: from alph.d.allbsd.org (p3086-ipbf906funabasi.chiba.ocn.ne.jp [122.26.46.86]) (authenticated bits=128) by mail.allbsd.org (8.14.5/8.14.5) with ESMTP id r61LMFSH003968 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 2 Jul 2013 06:22:25 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [127.0.0.1]) (authenticated bits=0) by alph.d.allbsd.org (8.14.5/8.14.5) with ESMTP id r61LMDxY090833; Tue, 2 Jul 2013 06:22:14 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Tue, 02 Jul 2013 06:21:49 +0900 (JST) Message-Id: <20130702.062149.303421326784941070.hrs@allbsd.org> To: wblock@wonkity.com Subject: Re: Proposal: multi-instance and self-contained rc.d script From: Hiroki Sato In-Reply-To: References: <20130701.062953.1443190655468739608.hrs@allbsd.org> <20130630221032.GB43309@stack.nl> X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.5 on Emacs 24.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart(Tue_Jul__2_06_21_49_2013_915)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97.4 at gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (mail.allbsd.org [133.31.130.32]); Tue, 02 Jul 2013 06:22:27 +0900 (JST) X-Spam-Status: No, score=-89.5 required=13.0 tests=CONTENT_TYPE_PRESENT, DIRECTOCNDYN,DYN_PBL,ONLY1HOPDIRECT,RCVD_IN_PBL,SAMEHELOBY2HOP, USER_IN_WHITELIST autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gatekeeper.allbsd.org Cc: freebsd-rc@FreeBSD.org X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.14 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: Mon, 01 Jul 2013 21:22:34 -0000 ----Security_Multipart(Tue_Jul__2_06_21_49_2013_915)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Warren Block wrote in : wb> On Mon, 1 Jul 2013, Jilles Tjoelker wrote: wb> wb> > On Mon, Jul 01, 2013 at 06:29:53AM +0900, Hiroki Sato wrote: wb> ... wb> >> b) Make rc.d/foo always have rc.d/foo(8) manual page. wb> > wb> > However, I don't like another set of manual pages. wb> wb> They could be autogenerated by reading comments and variable values in wb> the rc.d scripts. Of course the rc.d scripts would have to contain wb> that information. At least it would be in the same file, helping to wb> keep the doc in sync with the script. This is not to suggest a full wb> man page in the script, just a short text summary along with variables wb> that may be used. wb> wb> '/etc/rc.d/routed manpage' would return the generated mdoc code. wb> '/etc/rc.d/routed help' could pipe that output to man. wb> wb> What filenames or section would be used for the generated man pages? wb> routed(8) already exists, and "rc.d/routed.8" has problems both as a wb> filename and an argument to man(1). I do not think manual page autogeneration is simple becuase what we need is not just for one-line comments about each variable. The goal of adding manual pages is a replacement of rc.conf(5) manual page. It includes examples and usage of complex rc.d scripts like rc.d/netif. If we want an option to show comments for variables, adding the third parameter into set_rcvar like this: set_rcvar program /sbin/routed "Pathname of routing daemon" makes "rc.d/routed rcvar" possible to show them as routed_program="/sbin/routed" # Pathname of routing daemon (default: "/sbin/routed") wb> routed(8) already exists, and "rc.d/routed.8" has problems both as a wb> filename and an argument to man(1). What is the problem with the name rc.d/routed(8)? -- Hiroki ----Security_Multipart(Tue_Jul__2_06_21_49_2013_915)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (FreeBSD) iEYEABECAAYFAlHR8u0ACgkQTyzT2CeTzy1engCg0Jz0qm0nCNNe3KELpaBBpSmd +3AAoKnJid7N4xn9LVGLiTOGUaQ2gZZl =AA0J -----END PGP SIGNATURE----- ----Security_Multipart(Tue_Jul__2_06_21_49_2013_915)----