Tillman Hodgson tillman at seekingfire.com
Fri Mar 5 11:23:56 PST 2004

On Mon, Feb 23, 2004 at 03:06:07PM -0600, Scot W. Hetzel wrote:
> From: "Freddie Cash" <fcash-ml at sd73.bc.ca>
> > Ah, thank you for explaining it a little better.  The situations above
> > makes things much clearer for me.  For now, I'll leave it with the
> > old, non-RCng script until I can wrap my head around the whole of RCng
> > and rc-subr and how it all works.
> >
> Have a look at ports/security/cyrus-sasl/files/saslauthd.sh for a very
> simple RCng script.
> Also read the man page for rc.subr (4.x install rc_subr port first to read
> man page)
> For more complex RCng scripts look at the 5.x /etc/rc.d scripts:
>     http://www.freebsd.org/cgi/cvsweb.cgi/src/etc/rc.d


I thought I'd pick up on this thread. I'm working on an rcNG for a port
that would work similar to way that static_routes work in rc.conf: the
"flags" variable would list config file names. I'd then use a "for i
${flags}; do" type statement to to look for a config file of the same
name in a specific directory and, if it exists, start the program with
that config file. I'd also like to parse the command line for it ...
"start config1" and "stop config1", for example, with the default if
unspecified meaning "all".

I imagine that this is a generic problem and has already been solved in
a clean and satisfactory fashion. If so, would somebody please point me
to an rcNG script that does something like this? If not, any pointers as
to how to safely wrap "command=" in a for look would be great :-)



"The real question is not whether machines think but whether men do."
	- B. F. Skinner, _Contingencies of Reinforcement_

More information about the freebsd-ports mailing list