Subject: Re: DEINSTALL scripts for daemon packages
To: Jon Buller <>
From: Johnny C. Lam <>
List: tech-pkg
Date: 05/24/2001 04:15:39
Jon Buller <> writes:
> 1) Anyone want to recommend if the DEINSTALL script should abort the
>    pkg_delete if the daemon involved is running, or kill the daemon
>    and continue?

If we do go down the road of having the DEINSTALL script check if the
daemon is running, then it should just abort the pkg_delete.  After
all, at that point, it'll be obvious to the admin that he should kill
the daemon and pkg_delete again if he desires.  Otherwise, it would be
bad to inadvertently kill a daemon and delete its package on a typo.

> 2) Are there any known exceptions to this?  (That is, anyone know
>    of a time/place/package where this would be a bad idea.  I assume
>    one may turn up while I'm looking, but thought an early warning
>    might help me think of what to do before I commit an obviously
>    stupid thing in a place I didn't think enough about it, or didn't
>    realize that it should be an exception.)

I can't think of any exceptions, but it does mean that we need to
extend all of those rc.d scripts to properly reply to a status
command.  That pretty much calls for standalone rc.d scripts,
otherwise they won't work on pre-1.5 NetBSD systems.

> 3) Anyone have any other suggestions?

Not really, but I question its need.  I think the admin should really
be responsible and stop the daemon manually prior to pkg_deleting it.

> 4) Anyone want to help?

I'll take care of PostgreSQL and Apache if we decide to head down this

     -- Johnny C. Lam <>
        Department of Statistics, Carnegie Mellon University