Subject: Re: pkgsrc rc.d scripts
To: Frederick Bruckman <>
From: Greywolf <>
List: tech-pkg
Date: 05/15/2001 17:22:21
On Tue, 15 May 2001, Frederick Bruckman wrote:

# > 	something similar to Greg's posting where the necessary
# > 	functions are embedded in the rc script.
# Yes, it is nice. I'm hesitating to declare that the "standard", only
# because I'd like to write more rc.d scripts, but I can't test them on
# 1.3.2, as Greg did. Maybe I'm being overly cautious.

I don't think the functions should be embedded in each script, certainly;
only those which are truly germane to a script should be there.  Right now,
we are able to avoid the overhead in /etc/rc.d because the invoking shell
sources the subr file and then sources each of the rc.d files (with a
flag set to indicate that subr is to be essentially skipped.  The speed-
up inherent in this is noticeable, even on a fast box and certainly on
an SS5).

If we're to develop rc.d scripts, fine, but please follow the existing
model and put in the flag (thanks, lukem!) so that the overhead is

# > 	Maybe even have a pkgsrc/mk/rc.subr which can be appended to
# > 	rc scripts on install?
# To each script? Someone voiced an idea to package up rcorder, rc.subr,
# rc.d and friends. I think it's a neat idea, but it doesn't solve the
# problem completely, because I'm sure some people will insist on doing
# things the old way. If we leave the old script untouched, however,
# they'll have nothing to complain about.

*BSD: penguin flesh never tasted so good.