Subject: Re: What about startup scripts??
To: Al B. Snell <>
From: Frederick Bruckman <>
List: tech-pkg
Date: 01/04/2001 15:55:28
On Thu, 4 Jan 2001, Al B. Snell wrote:

> On Wed, 3 Jan 2001, Frederick Bruckman wrote:
> > OK, so anything's possible. Your example, IMHO, demonstrates exactly
> > why we should leave all the config's in /etc.
> Why?

Because the resulting rc.d scripts are more complicated than the base
scripts. I was originally against rc.d, because of the requirement to
write all those scripts for packages. Now that I see how easy it is to
copy an existing base script and modify it -- using the full power of
rc.subr -- I'm all for it, but that only works if you drop them into
/etc/rc.d, and set their variables in /etc/rc.conf (or /etc/rc.conf.d,
or somewhere else on the / file-system). Having to write stand-alone
rc.d scripts, so people could keep their /etc pure, sucks.

> > By the way, xfstt installs to ${X11PREFIX}, not pkg. Some users set
> > LOCALBASE to /usr/local, so they don't even have a /usr/pkg.
> Yep, but there are existing solutions to all that - $LOCALBASE can be read
> in the install script and the scripts created accordingly.

Well ${PREFIX}, but yeah, you have to do that anyway, to get the path
to the binary.

> > If
> > you want all the configs in one place, rather than in
> > /usr/{,X11R6/,pkg/,local/}etc, that one place should be /etc. :-)
> Yeah... but we don't want them all in one place!

There seems to be a philisophical precipice here. It could fall either
way. From my point of view, if it saves one or two key-strokes to put
everything in /etc, that's where it should be. That's all I have to
say about that.

> > Here's my xfstt script. Compare. Here, the user edits exactly one line
> > in /etc/rc.conf (or /etc/rc.conf.d/xfstt).
> Whoa! You've gone right back to the "create rc.d scripts for packages in
> exactly the same was as for everything else" method I suggested
> originally! Everyone complained that package stuff should live outside of
> the roo partition, which is why I came up with the system I've been
> explaining, which provides the same features while keeping /usr/pkg
> contained.

Well, not everyone. BTW, this was all discussed extensively back in May,
with no clear consensus:

Interestingly, more than a few folks asked that simply dropping the
script into .../etc/rc.d/ should activate it, rather than also editing
a config file. I almost hate to ask, but have we abondonded that idea?
[I never liked it.]

> And you say "Here, the user edits exactly one..." as if this doesn't hold
> for what I proposed too - just the line the user edits is in
> /usr/pkg/etc/rc.conf instead in my version...

I read that you were proposing two versions of the rc.d script to
serve two different set-ups. Maybe I didn't understand. It also seems
that your script is not complete and working. Filling in the missing
functionality which is found in /etc/rc.subr (choice of
.../etc/rc.conf or .../etc/rc.conf.d/, for one) would make it a lot
more complicated than the script I gave.