Subject: Re: DEINSTALL scripts for daemon packages
To: NetBSD Packages Technical Discussion List <tech-pkg@NetBSD.ORG>
From: Greg A. Woods <woods@weird.com>
List: tech-pkg
Date: 05/24/2001 14:22:58
[ On Thursday, May 24, 2001 at 15:12:48 (+0100), David Brownlee wrote: ]
> Subject: Re: DEINSTALL scripts for daemon packages
>
> By putting in in DEINSTALL you lose the ability to have
> 'check to see if it would be OK to remove this package'
> functionality.
No you don't:
If the package contains a require file (see pkg_create(1)), then this is
executed first as
require <pkg-name> DEINSTALL
(where pkg-name is the name of the package in question and DEINSTALL is a
keyword denoting that this is a deinstallation) to see whether or not de-
installation should continue. A non-zero exit status means no, unless
the -f option is specified.
(though obviously you have to write a REQUIRE script too :-)
--
Greg A. Woods
+1 416 218-0098 VE3TCP <gwoods@acm.org> <woods@robohack.ca>
Planix, Inc. <woods@planix.com>; Secrets of the Weird <woods@weird.com>