From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.67) (envelope-from ) id 1IEQGP-0000hz-NN for garchives@archives.gentoo.org; Fri, 27 Jul 2007 13:53:54 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.14.0/8.14.0) with SMTP id l6RDpSNX024786; Fri, 27 Jul 2007 13:51:28 GMT Received: from out2.smtp.messagingengine.com (out2.smtp.messagingengine.com [66.111.4.26]) by robin.gentoo.org (8.14.0/8.14.0) with ESMTP id l6RDjQ7j016509 for ; Fri, 27 Jul 2007 13:45:26 GMT Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id 6B684A35B for ; Fri, 27 Jul 2007 09:45:26 -0400 (EDT) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute1.internal (MEProxy); Fri, 27 Jul 2007 09:45:26 -0400 X-Sasl-enc: rmW81jMzQD+m9cFIQY1ylCpbC7f+EnOv+AeyDXjmogYs 1185543926 Received: from [192.168.31.10] (cpe-76-185-203-114.tx.res.rr.com [76.185.203.114]) by www.fastmail.fm (Postfix) with ESMTP id 0B2981EAB8 for ; Fri, 27 Jul 2007 09:45:25 -0400 (EDT) Subject: Re: [gentoo-user] How should I kill a daemon from an ebuild file? From: Albert Hopkins To: gentoo-user@lists.gentoo.org In-Reply-To: <1185540896.16094.5.camel@omc-2.omesc.com> References: <1185540896.16094.5.camel@omc-2.omesc.com> Content-Type: text/plain Organization: Gentoo Foundation Date: Fri, 27 Jul 2007 08:45:24 -0500 Message-Id: <1185543924.23477.13.camel@blackwidow.nbk> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@gentoo.org Reply-to: gentoo-user@lists.gentoo.org Mime-Version: 1.0 X-Mailer: Evolution 2.10.2 Content-Transfer-Encoding: 7bit X-Archives-Salt: 08e7f31e-79bc-45a4-b681-37f3b5277c0b X-Archives-Hash: bb5e70e9975320a73f821eeb368704ba On Fri, 2007-07-27 at 14:54 +0200, Jules Colding wrote: > Hi, > > I have an ebuild (see below) for a small keyring daemon. I would like > to > kill the daemon process, if it is running, whenever it is emerged > again > to ensure that no running daemon process refers to an old install. > > Is there a clean and recommended way of doing this in an ebuild or > should I just use killall in pkg_postinst()? You might wanna check the -dev mailing list to be sure, but I'm almost certain that they'll tell you this is a no-no. Generally speaking ebuilds should build/install packages and not affect the system in ways like starting/killing processes. A simple ELOG message is the preferred method. Nevertheless, the -dev list is probably the better forum to answer your question. -- Albert W. Hopkins -- gentoo-user@gentoo.org mailing list