From owner-freebsd-rc@FreeBSD.ORG Wed Oct 22 17:08:28 2014 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 87BFB300; Wed, 22 Oct 2014 17:08:28 +0000 (UTC) Received: from zion.christianserving.org (zion.christianserving.org [66.128.242.154]) by mx1.freebsd.org (Postfix) with ESMTP id 5FFFB69D; Wed, 22 Oct 2014 17:08:27 +0000 (UTC) Received: from zion.christianserving.org (localhost.christianserving.org [127.0.0.1]) by zion.christianserving.org (Postfix) with ESMTP id 7020B22C1D3; Wed, 22 Oct 2014 12:02:38 -0500 (CDT) X-Virus-Scanned: amavisd-new at christianserving.org X-Spam-Flag: NO X-Spam-Score: -1.107 X-Spam-Level: X-Spam-Status: No, score=-1.107 tagged_above=-9999 required=6 tests=[BAYES_00=-1.9, RDNS_NONE=0.793] autolearn=no Received: from [192.168.2.27] (unknown [50.252.68.50]) by zion.christianserving.org (Postfix) with ESMTPSA; Wed, 22 Oct 2014 12:02:37 -0500 (CDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: [CFT] multiple instance support in rc.d script From: Jim Riggs In-Reply-To: <20141017.102259.2303779237508789020.hrs@allbsd.org> Date: Wed, 22 Oct 2014 12:02:36 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: <685F1351-19A9-47F8-8119-AD6FAE903B10@christianserving.org> References: <20141017.102259.2303779237508789020.hrs@allbsd.org> To: freebsd-rc@freebsd.org, hrs@FreeBSD.org X-Mailer: Apple Mail (2.1878.6) X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.18-1 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, 22 Oct 2014 17:08:28 -0000 On 16 Oct 2014, at 20:22, Hiroki Sato wrote: > I would like your feedback and testers of the attached patch. This > implements multiple instance support in rc.d scripts. You can try it > by replacing /etc/rc.subr with the attached one. I really like the idea, as I have written at least 2 or 3 ports in which = I have needed support for multiple "profiles" (as I have seen them = called in several ports). So, I had to duplicate the multiple-instance = logic in the rc script for each. This would save all of that = aggravation. The only concern I have with generalizing the approach in rc.subr, = though, is that not every app/daemon/script can or should support it. I = worry that some things if run multiple times may stomp on each other or = corrupt data or break something. It seems that there should be a way for = each rc script to either opt in or opt out of multiple instance support. = I don't know which is better. Opt-in is probably safer, but then core = devs and port maintainers have to make specific changes to support it. = :-\ Thoughts?