Subject: Re: DEINSTALL scripts for daemon packages
To: Hubert Feyrer <>
From: David Brownlee <>
List: tech-pkg
Date: 05/24/2001 15:12:48
On Thu, 24 May 2001, Hubert Feyrer wrote:

> On Thu, 24 May 2001, David Brownlee wrote:
> > 	I'd suggest that pkg_delete call the status by default and refuse
> > 	to delete if the daemon is running, and have an optional flag to
> > 	pkg_delete to call 'stop' as needed.
> First, let me say that I agree with Johnny that it's the admin's job of
> ensuring a process is stopped before he removes files.
> That said, such policy things should be kept out of pkg_delete, and be
> implemented in DEINSTALL scripts instead.
	By putting in in DEINSTALL you lose the ability to have
	'check to see if it would be OK to remove this package'

> Maybe think about how to know the location of the rc.d script.
> Also, what happens if a pkg comes with more than one rc.d script?
> (see net/ucd-snmp)

	Run them all - all rc.d scripts should be able to be run with a
	'status' command and report whether or not anything for which they
	are responsible is running, and 'stop' without breaking anything
	if the appropriate daemon was not already running.

		David/absolute		-- No hype required --