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 1IEQK6-0006AQ-7Y for garchives@archives.gentoo.org; Fri, 27 Jul 2007 13:57:42 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.14.0/8.14.0) with SMTP id l6RDu66X032511; Fri, 27 Jul 2007 13:56:06 GMT Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by robin.gentoo.org (8.14.0/8.14.0) with ESMTP id l6RDqVn6026442 for ; Fri, 27 Jul 2007 13:52:32 GMT Received: from localhost (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 35D6664AE8 for ; Fri, 27 Jul 2007 13:52:31 +0000 (UTC) X-Virus-Scanned: amavisd-new at gentoo.org X-Spam-Score: -0.041 X-Spam-Level: X-Spam-Status: No, score=-0.041 required=5.5 tests=[AWL=-0.042, BAYES_50=0.001] Received: from smtp.gentoo.org ([127.0.0.1]) by localhost (smtp.gentoo.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KlbcgxE-ARLb for ; Fri, 27 Jul 2007 13:52:28 +0000 (UTC) Received: from mail-smtp3.ode.cdnet.dk (mail-smtp3.ode.cdnet.dk [85.218.129.6]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTP id 7DEDD65115 for ; Fri, 27 Jul 2007 13:52:26 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail-smtp3.ode.cdnet.dk (Postfix) with ESMTP id E639122802B for ; Fri, 27 Jul 2007 15:52:52 +0200 (CEST) Received: from mail-smtp3.ode.cdnet.dk ([127.0.0.1]) by localhost (mail-smtp3.ode.cdnet.dk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fMsMh9Y5xH8v for ; Fri, 27 Jul 2007 15:52:43 +0200 (CEST) Received: from [192.168.0.2] (unknown [85.218.191.254]) by mail-smtp3.ode.cdnet.dk (Postfix) with ESMTP id 9B6D1228013 for ; Fri, 27 Jul 2007 15:52:42 +0200 (CEST) Subject: [gentoo-dev] How should I kill a daemon from an ebuild file? From: Jules Colding To: Gentoo Dev Content-Type: text/plain Date: Fri, 27 Jul 2007 15:52:13 +0200 Message-Id: <1185544333.16094.28.camel@omc-2.omesc.com> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@gentoo.org Reply-to: gentoo-dev@lists.gentoo.org Mime-Version: 1.0 X-Mailer: Evolution 2.8.3 Content-Transfer-Encoding: 7bit X-Archives-Salt: a45e7a75-247e-449d-b33b-439792e87e19 X-Archives-Hash: d794735b085938cb9f661243c98c7cd8 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()? Or is this ultimately a big no-no?? Thanks, jules # # Ebuild file for the Brutus Keyring. # Copyright (C) 2007 OMC Denmark ApS # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, # MA 02111-1307 USA # # Please see http://gentoo-wiki.com/HOWTO_Installing_3rd_Party_Ebuilds # on how to use this ebuild file. # # $Header: $ inherit eutils DESCRIPTION="Brutus Keyring daemon" HOMEPAGE="http://www.omesc.com/" SRC_URI="http://www.omesc.com/sites/default/files/downloads/dist/brutus-keyring/Gentoo/brutus-keyring-0.9.3.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86 ~amd64" IUSE="debug" RESTRICT="nomirror" DEPEND=">=gnome-base/orbit-2.14.1 >=dev-libs/libIDL-0.8.5 >=dev-util/pkgconfig-0.20 >=dev-libs/libgcrypt-1.2.2 gnome-base/gnome-common" DOCS="COPYING README INSTALL docs/brutus-keyring-guide docs/brutus-keyring-devel-guide" src_compile() { BRUTUS_ECONF="--enable-brutus-dist=yes \ --enable-brutus-devel=yes \ --enable-brutus-target=gentoo \ $(use_enable debug brutus-debug yes)" econf ${BRUTUS_ECONF} || die "econf failed" emake || die "emake failed" } src_install() { emake DESTDIR="${D}" install || die "emake install failed" dodoc ${DOCS} } pkg_postinst() { elog "brutus-keyring has been installed" } -- gentoo-dev@gentoo.org mailing list