diff options
author | Ray Russell Reese III <anti@gentoo.org> | 2004-05-30 00:05:17 +0000 |
---|---|---|
committer | Ray Russell Reese III <anti@gentoo.org> | 2004-05-30 00:05:17 +0000 |
commit | d992d60022c6cdd472c262034bbe4daa22a2c592 (patch) | |
tree | 51f870685367926e51555b70a27e5351b3b1e6b4 /net-analyzer | |
parent | fix bug #52387. cleanup some use stuff. (diff) | |
download | gentoo-2-d992d60022c6cdd472c262034bbe4daa22a2c592.tar.gz gentoo-2-d992d60022c6cdd472c262034bbe4daa22a2c592.tar.bz2 gentoo-2-d992d60022c6cdd472c262034bbe4daa22a2c592.zip |
Added new init.d script
Diffstat (limited to 'net-analyzer')
-rw-r--r-- | net-analyzer/rtg/ChangeLog | 8 | ||||
-rw-r--r-- | net-analyzer/rtg/Manifest | 8 | ||||
-rw-r--r-- | net-analyzer/rtg/files/digest-rtg-0.7.4-r1 | 1 | ||||
-rw-r--r-- | net-analyzer/rtg/files/rtgpoll.confd | 9 | ||||
-rw-r--r-- | net-analyzer/rtg/files/rtgpoll.initd | 49 | ||||
-rw-r--r-- | net-analyzer/rtg/rtg-0.7.4-r1.ebuild | 51 |
6 files changed, 123 insertions, 3 deletions
diff --git a/net-analyzer/rtg/ChangeLog b/net-analyzer/rtg/ChangeLog index 6e38191ec1d9..d162ff6044da 100644 --- a/net-analyzer/rtg/ChangeLog +++ b/net-analyzer/rtg/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-analyzer/rtg # Copyright 2000-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/rtg/ChangeLog,v 1.2 2004/05/08 14:51:01 kugelfang Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/rtg/ChangeLog,v 1.3 2004/05/30 00:05:17 anti Exp $ + +*rtg-0.7.4-r1 (29 May 2004) + + 29 May 2004; Ray Russell Reese III <anti@gentoo.org> rtg-0.7.4-r1.ebuild, + files/rtgpoll.confd, files/rtgpoll.initd: + Added new init.d script for rtgpoll. 08 May 2004; Danny van Dyk <kugelfang@gentoo.org> rtg-0.7.4.ebuild: Marked ~amd64. diff --git a/net-analyzer/rtg/Manifest b/net-analyzer/rtg/Manifest index cd5913bcbcf6..a9c97319761b 100644 --- a/net-analyzer/rtg/Manifest +++ b/net-analyzer/rtg/Manifest @@ -1,5 +1,9 @@ -MD5 9f32a4ff418b056634c3e2de896947fc ChangeLog 422 -MD5 e25c84fd1a2a0c0e81cacb709f6cbbbe metadata.xml 260 MD5 9e1a08e2650b970803482871a6251d53 rtg-0.7.4.ebuild 1012 +MD5 e25c84fd1a2a0c0e81cacb709f6cbbbe metadata.xml 260 +MD5 9f32a4ff418b056634c3e2de896947fc ChangeLog 422 +MD5 38973534c48c4732b9655c2838af15d6 rtg-0.7.4-r1.ebuild 1059 MD5 6692acdf355eb282398b0e09eee80d02 files/digest-rtg-0.7.4 61 MD5 95d2926c7d784e64b502842c3d3597b5 files/rtg-0.7.4-pathfix.patch 4074 +MD5 948da40b196b07621e6d1212da29f5a6 files/rtgpoll.confd 263 +MD5 be4740901d0c72692b3a0481639b806a files/rtgpoll.initd 1166 +MD5 6692acdf355eb282398b0e09eee80d02 files/digest-rtg-0.7.4-r1 61 diff --git a/net-analyzer/rtg/files/digest-rtg-0.7.4-r1 b/net-analyzer/rtg/files/digest-rtg-0.7.4-r1 new file mode 100644 index 000000000000..fd1fc2b8a83e --- /dev/null +++ b/net-analyzer/rtg/files/digest-rtg-0.7.4-r1 @@ -0,0 +1 @@ +MD5 c61ff1323701e2771bb5ff9cf67f1b77 rtg-0.7.4.tar.gz 710621 diff --git a/net-analyzer/rtg/files/rtgpoll.confd b/net-analyzer/rtg/files/rtgpoll.confd new file mode 100644 index 000000000000..0ef172060796 --- /dev/null +++ b/net-analyzer/rtg/files/rtgpoll.confd @@ -0,0 +1,9 @@ +# Copyright 1999-2004 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/rtg/files/rtgpoll.confd,v 1.1 2004/05/30 00:05:17 anti Exp $ + +# RTGPOLL_TARGETS defines the targets file to run the poller on. The default +# should be fine. + +RTGPOLL_TARGETS=/etc/rtg/targets.cfg + diff --git a/net-analyzer/rtg/files/rtgpoll.initd b/net-analyzer/rtg/files/rtgpoll.initd new file mode 100644 index 000000000000..8f76af1653f6 --- /dev/null +++ b/net-analyzer/rtg/files/rtgpoll.initd @@ -0,0 +1,49 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/rtg/files/rtgpoll.initd,v 1.1 2004/05/30 00:05:17 anti Exp $ + +[ -z "${RTGPOLL_TARGETS}" ] && RTGPOLL_TARGETS=/etc/rtg/targets.cfg + +opts="${opts} reload" + +depend() { + need net mysql +} + +checkconfig() { + if [ ! -e /etc/rtg/rtg.conf ] ; then + eerror "You need an /etc/rtg/rtg.conf config file to run rtgpoll" + return 1 + fi + + if [ ! -e "${RTGPOLL_TARGETS}" ] ; then + eerror "${RTGPOLL_TARGETS} doesn't exist, you must have a targets configuration to run rtgpoll" + return 1 + fi +} + +start() { + checkconfig || return 1 + ebegin "Starting rtgpoll" + start-stop-daemon --start --background --quiet --pidfile /var/run/rtgpoll.pid --exec /usr/bin/rtgpoll -- -t ${RTGPOLL_TARGETS} + eend $? +} + +reload() { + if [ ! -f /var/run/rtgpoll.pid ]; then + eerror "rtgpoll isn't running" + return 1 + fi + ebegin "Reloading configuration" + kill -HUP `cat /var/run/rtgpoll.pid` &>/dev/null + eend $? +} + + +stop() { + ebegin "Stopping rtgpoll" + start-stop-daemon --stop --quiet --signal 9 --name rtgpoll --pidfile /var/run/rtgpoll.pid + eend $? +} + diff --git a/net-analyzer/rtg/rtg-0.7.4-r1.ebuild b/net-analyzer/rtg/rtg-0.7.4-r1.ebuild new file mode 100644 index 000000000000..2797461a74a6 --- /dev/null +++ b/net-analyzer/rtg/rtg-0.7.4-r1.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2004 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/rtg/rtg-0.7.4-r1.ebuild,v 1.1 2004/05/30 00:05:17 anti Exp $ + +inherit eutils + +DESCRIPTION="RTG: Real Traffic Grabber" +HOMEPAGE="http://rtg.sourceforge.net/" +SRC_URI="mirror://sourceforge/rtg/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86 ~amd64" +IUSE="" + +DEPEND=">=dev-db/mysql-3.23.52-r1 + >=net-analyzer/net-snmp-5.0.9-r1" + +src_compile() { + epatch ${FILESDIR}/${P}-pathfix.patch + + ./configure \ + --host=${CHOST} \ + --prefix=/usr \ + --sysconfdir=/etc/rtg \ + --datadir=/usr/share/rtg \ + --infodir=/usr/share/info \ + --mandir=/usr/share/man || die "./configure failed" + + emake || die +} + +src_install() { + einstall || die + + dodoc FAQ README + + insinto /etc/conf.d + newins ${FILESDIR}/rtgpoll.confd rtgpoll + exeinto /etc/init.d + newexe ${FILESDIR}/rtgpoll.initd rtgpoll +} + +pkg_postinst() { + einfo "RTG has been installed." + einfo "" + einfo "The default configuration file location is now /etc/rtg" + einfo "" + einfo "Sample reports have been installed into /usr/share/rtg" + einfo "" +} |