From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1P1MDs-0000XL-Kv for garchives@archives.gentoo.org; Thu, 30 Sep 2010 16:43:09 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 44135E0954; Thu, 30 Sep 2010 16:43:07 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 11AFFE0954 for ; Thu, 30 Sep 2010 16:43:07 +0000 (UTC) Received: from flycatcher.gentoo.org (flycatcher.gentoo.org [81.93.255.6]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 8307B1B4104 for ; Thu, 30 Sep 2010 16:43:06 +0000 (UTC) Received: by flycatcher.gentoo.org (Postfix, from userid 2078) id 275EB2003C; Thu, 30 Sep 2010 16:43:05 +0000 (UTC) From: "Jeroen Roovers (jer)" To: gentoo-commits@lists.gentoo.org Reply-To: gentoo-dev@lists.gentoo.org, jer@gentoo.org Subject: [gentoo-commits] gentoo-x86 commit in net-analyzer/pmacct/files: pmacctd-init.d X-VCS-Repository: gentoo-x86 X-VCS-Files: pmacctd-init.d X-VCS-Directories: net-analyzer/pmacct/files X-VCS-Committer: jer X-VCS-Committer-Name: Jeroen Roovers Content-Type: text/plain; charset=utf8 Message-Id: <20100930164305.275EB2003C@flycatcher.gentoo.org> Date: Thu, 30 Sep 2010 16:43:05 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 99a1bf94-ebcf-4d35-bf0d-a8fb039f40cf X-Archives-Hash: 153a2b367846cc1c49203c359d272e56 jer 10/09/30 16:43:05 Modified: pmacctd-init.d Log: Version bump thanks to Marcin Miros=C5=82aw (bug #339229). Change init.= d script to allow multiple instances by Marcin Miros=C5=82aw (bug #306837= ). =20 (Portage version: 2.2_rc86/cvs/Linux i686) Revision Changes Path 1.5 net-analyzer/pmacct/files/pmacctd-init.d file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/pmacc= t/files/pmacctd-init.d?rev=3D1.5&view=3Dmarkup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/pmacc= t/files/pmacctd-init.d?rev=3D1.5&content-type=3Dtext/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/pmacc= t/files/pmacctd-init.d?r1=3D1.4&r2=3D1.5 Index: pmacctd-init.d =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /var/cvsroot/gentoo-x86/net-analyzer/pmacct/files/pmacctd-init.= d,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- pmacctd-init.d 1 Jun 2009 09:48:41 -0000 1.4 +++ pmacctd-init.d 30 Sep 2010 16:43:05 -0000 1.5 @@ -1,29 +1,37 @@ #!/sbin/runscript -# Copyright 1999-2004 Gentoo Foundation +# Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/pmacct/files/pmacctd-ini= t.d,v 1.4 2009/06/01 09:48:41 pva Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/pmacct/files/pmacctd-ini= t.d,v 1.5 2010/09/30 16:43:05 jer Exp $ + +PMACCTDDIR=3D${PMACCTDDIR:-/etc/pmacct} +if [ ${SVCNAME} !=3D "pmacctd" ]; then + PMACCTDPID=3D"/var/run/${SVCNAME}.pid" +else + PMACCTDPID=3D"/var/run/pmacctd.pid" +fi +PMACCTDCONF=3D"${PMACCTDDIR}/${SVCNAME}.conf" =20 depend() { need net } =20 checkconfig() { - if [ ! -e /etc/pmacctd.conf ] ; then - eerror "You need an /etc/pmacctd.conf file to run pmacctd" + if [ ! -e ${PMACCTDCONF} ] ; then + eerror "You need an ${PMACCTDCONF} file to run pmacctd" return 1 fi } =20 start() { checkconfig || return 1 - ebegin "Starting pmacctd" - start-stop-daemon --start --pidfile /var/run/pmacctd.pid --exec /usr/sb= in/pmacctd \ - -- -D -f /etc/pmacctd.conf -F /var/run/pmacctd.pid ${OPTS} + ebegin "Starting ${SVCNAME}" + start-stop-daemon --start --pidfile "${PMACCTDPID}" --exec /usr/sbin/pm= acctd \ + -- -D -f "${PMACCTDCONF}" -F "${PMACCTDPID}" ${OPTS} eend $? } =20 stop() { - ebegin "Stopping pmacctd" - start-stop-daemon --stop --pidfile /var/run/pmacctd.pid --exec /usr/sbi= n/pmacctd + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --pidfile "${PMACCTDPID}" --exec /usr/sbin/pma= cctd eend $? }