Subject: Re: pkgsrc rc.d scripts and NFS /usr
To: None <>
From: Greg A. Woods <>
List: tech-pkg
Date: 11/20/2001 17:49:30
[ On Tuesday, November 20, 2001 at 10:07:36 (-0800), Johnny Lam wrote: ]
> Subject: pkgsrc rc.d scripts and NFS /usr
> The default NetBSD setup assumes that /usr may be NFS-mounted.  The default
> pkgsrc setup assumes that ${LOCALBASE} is /usr/pkg.  In light of this, should
> pkgsrc rc.d scripts add "mountcritremote" to their REQUIRES lines to
> guarantee that /usr/pkg is available in the default NetBSD setup?

Ah, I think you should (re)read /etc/rc.  Perhaps you might even try
making a couple of small modifications to a test version of it and try
it out while pretending your ${PREFIX} is on an unmounted (or
non-existant) filesystem.

Hint:  with the current implementation of /etc/rc no rc.d script can
ever work if it's installed on any non-root filesystem (never mind NFS).

Either that or we must make ${PREFIX}/etc/rc.d be a symlink pointing to
/etc/rc.d and at least integrate this much of each package into the
native system hierarchy.  At that point your proposal would have meaning.

Alternatively a two-phase /etc/rc implementation would eliminate any
need for your specific proposal to be implemented since all of the
second phase itself must depend on mountcritremote.  The second phase
might well be called /etc/rc.d/pkgrc or similar, and be itself more or
less just a recursive copy of /etc/rc (which of course makes it very
easy for it to depend on mountcritremote).

I favour the former (of course :-) and have used it successfully now on
many machines.  Note that even if you set PREFIX=/usr you still need to
make the symlink, which in this case is better done as /usr/etc->/etc.

The major drawback of the latter is that it doesn't integrate the
dependencies of the system rc.d scripts, making it somewhat more limited
in usefulness.  I'm not sure this is is actually a major drawback though.

							Greg A. Woods

+1 416 218-0098      VE3TCP      <>     <>
Planix, Inc. <>;   Secrets of the Weird <>