Subject: Re: more work in rc.d [was Re: rc, rc.shutdown proposed change]
To: None <tech-userlevel@netbsd.org>
From: Michael Richardson <mcr@sandelman.ottawa.on.ca>
List: tech-userlevel
Date: 03/12/2000 18:25:34
>>>>> "Jason" == Jason R Thorpe <thorpej@shagadelic.org> writes:
    Jason> On Mon, Mar 13, 2000 at 09:08:32AM +1100, Luke Mewburn wrote:

    >> c) Add support for /etc/rc.pkg.d, and ensure that that directory
    >> is created during installation.
    >> This is for packages. After a package installation a user should
    >> copy the script from /usr/pkg/share/examples/rc.d/ to /etc/rc.pkg.d
    >> to enable the startup.

    Jason> This is a lose.  Once the user installs a package, he shouldn't have
    Jason> to copy stuff around to make it go.  I think this is going to be a serious
    Jason> negative for our pkg system.

  I agree with what you are saying, but we have conflicting requirements.

  What are the choices?

  1) put /usr/pkg/etc/rc.d on the RC list. 
	 PRO: nothing for the user to do/configure
	 CON: configuration info not in /etc.	
	      /usr/pkg becomes hard to share since all clients will
		       run the server as well.

  2) have pkg-system copy into /etc/rc.d or /etc/rc.pkg.d etc.
	  PRO: nothing for the user to do/configure
	       configuration info is in /etc.
	  CON: an NFS mount of /usr/pkg is not complete. The clients
	       that do wish to run servers/etc. won't have the scripts.

  3) copy/ln -s from /etc/rc.d to /usr/pkg/etc/rc.d
          PRO: configure info is in /etc.
	       clients have entire package
	  CON: users have to do something

  I prefer #3. Perhaps the link from /etc/rc.d to /usr/pkg/etc/rc.d
should occur automatically on "make install" for pkgsrc. Then, on the client
(if there is one) the link has to be made if desired. This is a no-op for
machines with a private /usr/pkg. Maybe we should have "pkg_enable foo"
to do this for us, and perhaps create any accounts, etc. (ssh host key...) that 
is required.

   :!mcr!:            |  Cow#1: Are you worried about getting Mad Cow Disease?
   Michael Richardson |  Cow#2: No. I'm a duck.
 Home: mcr@sandelman.ottawa.on.ca. PGP key available.