From owner-freebsd-rc@FreeBSD.ORG Wed Oct 22 19:07:38 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 7E3BFDDE; Wed, 22 Oct 2014 19:07:38 +0000 (UTC) Received: from cargobay.net (cargobay.net [174.136.100.98]) by mx1.freebsd.org (Postfix) with ESMTP id 695EB3C4; Wed, 22 Oct 2014 19:07:37 +0000 (UTC) Received: from naruto.ccsys.com (unknown [65.35.132.177]) by cargobay.net (Postfix) with ESMTPSA id 950B5597; Wed, 22 Oct 2014 19:06:56 +0000 (UTC) Message-ID: <54480071.9040004@ccsys.com> Date: Wed, 22 Oct 2014 19:07:29 +0000 From: "Chad J. Milios" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: Jim Riggs , freebsd-rc@freebsd.org, hrs@FreeBSD.org Subject: Re: [CFT] multiple instance support in rc.d script References: <20141017.102259.2303779237508789020.hrs@allbsd.org> <685F1351-19A9-47F8-8119-AD6FAE903B10@christianserving.org> In-Reply-To: <685F1351-19A9-47F8-8119-AD6FAE903B10@christianserving.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: freebsd-ports 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 19:07:38 -0000 On 10/22/14 17:02, Jim Riggs wrote: > 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? Opt-in please