Subject: Re: post-installation and rc.d enhancements
To: NetBSD Userlevel Technical Discussion List <email@example.com>
From: Frederick Bruckman <firstname.lastname@example.org>
Date: 04/18/2002 15:38:57
On Thu, 18 Apr 2002, Greg A. Woods wrote:
> [ On Thursday, April 18, 2002 at 08:22:45 (-0500), Frederick Bruckman wrote: ]
> > Subject: Re: post-installation and rc.d enhancements
> > "Chaining" is ugly and complicated, and denies the user the ability to
> > arbitrarily set the order the scripts are executed (barring re-writing
> > the whole mechanism).
> Perhaps I didn't make it clear in my proposal that there's no such
> fundamental restriction in its design, and a major re-design is
> explicitly avoided.
[And then you go on and on about a Rube Goldberg scheme to chain rc.d
directories.] If any one but you were entertaining the idea that it
would be relatively simple and elegant to chain rc.d directories, your
explanation probably convinced him otherwise.
> > Moreover, as long as you
> > have protected namespaces, all the scripts *can* go in the same
> > directory, so why make it complicated?
> Well unless the basename derived namespace trick is made a bit more
> complex it is too inflexible.
> It's also quite a bit of shell magic an trickery that I fear will spread
> some of the complexities currently hidden deep inside /etc/rc.subr out
> into the individual rc.d scripts. In order to be written portably they
> will have to know where they are installed in order to derive their
> rcvar name.
Your fears are unfounded. pkg_ and local_ scripts will look just like
the base scripts, except their full-path "command" value will not be
in the base system. They will be installed into "/etc/rc.d/". The
rcvar is set in the script, and it's mostly supposed to match the
filename. "rcorder" doesn't care about anything below the first block,
which block is invisible to the shell, so the PROVIDE and REQUIRE tags
may drop the pkg_ or local_ prefix to permit a script to settle into
the sequence in the same place as its non-prefixed doppleganger.
No one's suggested protecting the user from starting both "pkg_named"
and "named", which is what your proposal seems to address -- for one,
the user might actually want to do that, and for another, "You Get
What You Ask For", i.e, we're all big boys and girls.
> In other words I really do not like namespaces that have to be
> implemented by modifying filenames and variable names.
OK, I'll bite. Isn't that what the word "namespace" means? (Having the
exact same name mean different things in different contexts is called
> The use of
> separate directories keeps rc.d scripts under my proposed scheme 100%
> identical to their current form...
Wow, are you on the wrong page. This is "tech-userlevel", where we
discuss changes to NetBSD that are visible to to end users. There's no
problem with extending the current form of the scripts. Perhaps such
caution was warranted in other forums (tech-pkg), but not here.