From owner-freebsd-rc@FreeBSD.ORG Fri Jun 9 21:55:49 2006 Return-Path: X-Original-To: freebsd-rc@FreeBSD.org Delivered-To: freebsd-rc@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B94DB16A46F; Fri, 9 Jun 2006 21:55:49 +0000 (UTC) (envelope-from alex@foxybanana.com) Received: from imf17aec.mail.bellsouth.net (imf17aec.mail.bellsouth.net [205.152.59.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0535F43D70; Fri, 9 Jun 2006 21:55:48 +0000 (GMT) (envelope-from alex@foxybanana.com) Received: from ibm57aec.bellsouth.net ([68.209.153.178]) by imf17aec.mail.bellsouth.net with ESMTP id <20060609215544.XVQA3692.imf17aec.mail.bellsouth.net@ibm57aec.bellsouth.net>; Fri, 9 Jun 2006 17:55:44 -0400 Received: from Laptop.mine.box ([68.209.153.178]) by ibm57aec.bellsouth.net with ESMTP id <20060609215543.PLE23598.ibm57aec.bellsouth.net@Laptop.mine.box>; Fri, 9 Jun 2006 17:55:43 -0400 Received: from Laptop.mine.box (localhost [127.0.0.1]) by Laptop.mine.box (8.13.6/8.13.6) with ESMTP id k59LtEGl077582; Fri, 9 Jun 2006 16:55:16 -0500 (CDT) (envelope-from alex@Laptop.mine.box) Received: (from alex@localhost) by Laptop.mine.box (8.13.6/8.13.6/Submit) id k59LtBIh077580; Fri, 9 Jun 2006 16:55:11 -0500 (CDT) (envelope-from alex) From: Alexander Botero-Lowry Message-Id: <200606092155.k59LtBIh077580@Laptop.mine.box> Date: Fri, 09 Jun 2006 16:55:10 -0500 To: erdgeist@erdgeist.org, delphij@FreeBSD.org References: <200606091826.k59IQfmo057494@freefall.freebsd.org> <20060609222512.Y15476@erdgeist.org> In-Reply-To: <20060609222512.Y15476@erdgeist.org> User-Agent: nail 11.25 7/29/05 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-bugs@FreeBSD.org, freebsd-rc@FreeBSD.org Subject: Re: conf/95162: [patch] Missing feature in rc.subr 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: Fri, 09 Jun 2006 21:55:49 -0000 It might be better to do this with a chkconfig(8) type tool. I happen to have written one for rc.d. It was developed on NetBSD but I got patches commited to FreeBSD last year or so that made it work ok on FreeBSD as well. http://exodus.xmms.se/~alex/varname.sh It uses /etc/rc.conf.d/ for enabling and disabling services. I've been using it for my own administrative needs and it works great. It also doesn't use anything from /usr so that it can be used in single user mode and the likes. I think this is a better solution then adding more stuff into rc.subr, and it mimics a tool that a lot of people have had experience using already. It was developed using some code that was in NetBSD cvs, but not much of that code remains. I also used the manpage from IRIX as a reference for the actual user interface of the tool, and so it mimics usage on IRIX very closely. Alex Dirk Engling wrote: > On Fri, 9 Jun 2006, Xin LI wrote: > > > Synopsis: [patch] Missing feature in rc.subr > > > > Responsible-Changed-From-To: freebsd-bugs->freebsd-rc > > Responsible-Changed-By: delphij > > Responsible-Changed-When: Fri Jun 9 18:26:02 UTC 2006 > > Responsible-Changed-Why: > > Over to the rc mailing list. Patch looks fine to me, may I commit > > it? > > > > http://www.freebsd.org/cgi/query-pr.cgi?pr=95162 > > Very nice idea. However, it does not take care of rc_conf_files, which > means that a variable set in /etc/rc.conf.local can not be unset that way. > > Further to be _very_ sure I'd > > grep -v "^${rcvar}=" > > to avoid removing too much from rc.conf. > > Also for clarity one could remove all ^${rcvar}= entries when enabling > ${rcvar}, possibly in an extra clear function, which might also take care > of rc_conf_files. > > Have I missed anything else? I would like to see this feature when its > ready. > > Regards > > erdgeist > _______________________________________________ > freebsd-rc@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-rc > To unsubscribe, send any mail to "freebsd-rc-unsubscribe@freebsd.org" > > !DSPAM:4,4489e7c5220991600813457! >