Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 09 Jun 2006 16:55:10 -0500
From:      Alexander Botero-Lowry <alex@foxybanana.com>
To:        erdgeist@erdgeist.org, delphij@FreeBSD.org
Cc:        freebsd-bugs@FreeBSD.org, freebsd-rc@FreeBSD.org
Subject:   Re: conf/95162: [patch] Missing feature in rc.subr
Message-ID:  <200606092155.k59LtBIh077580@Laptop.mine.box>
In-Reply-To: <20060609222512.Y15476@erdgeist.org>
References:  <200606091826.k59IQfmo057494@freefall.freebsd.org> <20060609222512.Y15476@erdgeist.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <erdgeist@erdgeist.org> 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!
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200606092155.k59LtBIh077580>