Subject: Re: managing /usr/pkg/etc/rc.d
To: Frederick Bruckman <>
From: David Brownlee <>
List: netbsd-users
Date: 05/15/2003 14:00:01
On Wed, 14 May 2003, Frederick Bruckman wrote:

> On Wed, 14 May 2003, David Brownlee wrote:
> > 	Requiring copying the file to /etc/rc.d doesn't stop the
> > 	system from running random listeners - requiring setting in
> > 	rc.conf does that. We should either have a command to install
> > 	the rc.d files for a given package, or just install them
> > 	by default (ie default PKG_RCD_SCRIPTS=yes).
> I have a few problems with setting PKG_RCD_SCRIPTS to yes. A few
> package scripts are still broken, and don't check the setting of a
> variable. Those could probably be fixed in a single sweep. Fixing that
> would make it a lot more acceptable, but even with that, there's still
> those annoying name space collisions. Finally, the implementation
> delete scripts from "/etc/rc.d", under some circumstances, when the
> package is deleted, which I find really annoying.

	Namespace collisions between packages or packages and the base

	Would you consider packages deleting rc.d scripts if they
	had not been modified from the installed copy as reasonable.

> > > This entire topic has been discussed to death on the appropriate
> > > lists, and it's not even on topic here. Our shame is that we've layed
> > > out 100,000 options, rather than coming to a decision to give users
> > > one recommended way.
> >
> > 	It might make sense to try to list the useful options, then
> > 	provide just those, in a clearly documented way.
> I really think we should nix most of them. If we choose the "right"
> solution, when a new user asks how to do it, we can give him a brief
> outline, point him to the documentation, and that will end the
> discussion. If we choose the wrong one, or simply document the lack
> of consensus, he'll want to talk about it, and that'll just start the
> whole argument all over again, and again.

	Agreed (probably). We should have a single recommended way,
	and then a small set of tunable aspects for those who want to
	do something different (more for it to get out of their way).

	So, if we wanted to automate 'everything':
	  - Default PKG_RCD_SCRIPTS=yes
	  - All pkg rc.d scripts must contain an identifying tag
	  - No pkg rc.d script runs _anything_ without a rc.conf var=yes
	  - rc.d scripts deleted on pkg deletion if they were unchanged
	    from the original
	  - Provide some pkg_XXX command or option to list the current
	    installed package scripts, including indicating which have
	    been modified and potentially orphaned (particularly useful
	    if it tried to handle conflicts - see next

	One thought on how to handle conflicts with original rc.d scriptss
	(eg: ssh)
	  - On install move original to /etc/rc.d/orig/ & install new script
	  - Revert on deletion

		David/absolute          -- No hype required --