From owner-freebsd-ports Mon May 28 17:16:42 2001 Delivered-To: freebsd-ports@freebsd.org Received: from mail.noos.fr (verlaine.noos.net [212.198.2.73]) by hub.freebsd.org (Postfix) with ESMTP id 54EFF37B423 for ; Mon, 28 May 2001 17:16:39 -0700 (PDT) (envelope-from root@gits.dyndns.org) Received: (qmail 41076106 invoked by uid 0); 29 May 2001 00:16:38 -0000 Received: from d165.dhcp212-198-231.noos.fr (HELO gits.dyndns.org) ([212.198.231.165]) (envelope-sender ) by verlaine.noos.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 29 May 2001 00:16:38 -0000 Received: (from root@localhost) by gits.dyndns.org (8.11.3/8.11.3) id f4T0GbU72454; Tue, 29 May 2001 02:16:37 +0200 (CEST) (envelope-from root) Message-Id: <200105290016.f4T0GbU72454@gits.dyndns.org> Subject: Re: No pre- or post-deinstall target? In-Reply-To: <20010529002638.A16801@c187104187.telekabel.chello.nl> To: Ernst de Haan Date: Tue, 29 May 2001 02:16:36 +0200 (CEST) Cc: ports@FreeBSD.ORG Reply-To: clefevre@redirect.to From: Cyrille Lefevre Organization: ACME X-Face: V|+c;4!|B?E%BE^{E6);aI.[<97Zd*>^#%Y5Cxv;%Y[PT-LW3;A:fRrJ8+^k"e7@+30g0YD0*^^3jgyShN7o?a]C la*Zv'5NA,=963bM%J^o]C X-Mailer: ELM [version 2.4ME+ PL92 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Ernst de Haan wrote: > > > this could be done using @unexec at the beginning of the pkg-plist file > > such as : > > > > @unexec [ -e /var/run/orion.pid ] && { echo killing orion.; kill `cat /var/run/orion.pid`; rm -f /var/run/orion.pid; } > > What would be the advantage of this? Isn't the pkg-deinstall the better > approach since it is simple and easy to grasp? in this case, a pkg-deinstall script take an unneeded inode in the CVS tree. and I know that we have to take care about this. so, pkg-install/deinstall script have to be created only when really needed. that is, when they can't be reduced to a only line script. > > an alternative would be to use killall such as : > > > > @unexec echo killing orion.; killall orion; rm -f /var/run/orion.pid > > Nah, in this case it won't work, since the name of the process is `java', not > `orion' :) game over, shot again :P PS : your signature is too long. Cyrille. -- home: mailto:clefevre@redirect.to UNIX is user-friendly; it's just particular work: mailto:Cyrille.Lefevre@edf.fr about who it chooses to be friends with. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message