diff options
author | Jeroen Roovers <jer@gentoo.org> | 2009-05-26 00:00:55 +0000 |
---|---|---|
committer | Jeroen Roovers <jer@gentoo.org> | 2009-05-26 00:00:55 +0000 |
commit | f3318bd270e2f7c2cc279ba0fbb59a599c4ae880 (patch) | |
tree | 02b910736ffa3d9c8701729c288434bbb35c304b /net-analyzer | |
parent | Linux patch 2.6.29.4. Alpha/PCI patch to make PCI resources available (diff) | |
download | historical-f3318bd270e2f7c2cc279ba0fbb59a599c4ae880.tar.gz historical-f3318bd270e2f7c2cc279ba0fbb59a599c4ae880.tar.bz2 historical-f3318bd270e2f7c2cc279ba0fbb59a599c4ae880.zip |
Initial commit.
Package-Manager: portage-2.2_rc33/cvs/Linux i686
Diffstat (limited to 'net-analyzer')
-rw-r--r-- | net-analyzer/dhcp_probe/ChangeLog | 11 | ||||
-rw-r--r-- | net-analyzer/dhcp_probe/Manifest | 7 | ||||
-rw-r--r-- | net-analyzer/dhcp_probe/dhcp_probe-1.3.0.ebuild | 42 | ||||
-rw-r--r-- | net-analyzer/dhcp_probe/files/dhcp_probe.confd | 6 | ||||
-rw-r--r-- | net-analyzer/dhcp_probe/files/dhcp_probe.initd | 48 | ||||
-rw-r--r-- | net-analyzer/dhcp_probe/files/dhcp_probe_mail | 23 | ||||
-rw-r--r-- | net-analyzer/dhcp_probe/metadata.xml | 13 |
7 files changed, 150 insertions, 0 deletions
diff --git a/net-analyzer/dhcp_probe/ChangeLog b/net-analyzer/dhcp_probe/ChangeLog new file mode 100644 index 000000000000..b69dd1b57bc4 --- /dev/null +++ b/net-analyzer/dhcp_probe/ChangeLog @@ -0,0 +1,11 @@ +# ChangeLog for net-analyzer/dhcp_probe +# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/dhcp_probe/ChangeLog,v 1.1 2009/05/26 00:00:55 jer Exp $ + +*dhcp_probe-1.3.0 (25 May 2009) + + 25 May 2009; Jeroen Roovers <jer@gentoo.org> +dhcp_probe-1.3.0.ebuild, + +files/dhcp_probe.confd, +files/dhcp_probe.initd, +files/dhcp_probe_mail, + +metadata.xml: + Initial commit. + diff --git a/net-analyzer/dhcp_probe/Manifest b/net-analyzer/dhcp_probe/Manifest new file mode 100644 index 000000000000..75e173f56cd5 --- /dev/null +++ b/net-analyzer/dhcp_probe/Manifest @@ -0,0 +1,7 @@ +AUX dhcp_probe.confd 113 RMD160 a91f55c099a9213523b1e4994c0e341d3a5cab94 SHA1 f213c9f2bdd253c383899c9ada004052997bb5c1 SHA256 85e7f88a42699e13f4245c9eefa4e505deb51f43c77b855d6063e5bd4ab73bba +AUX dhcp_probe.initd 1295 RMD160 377f4bbf3aaaf7dffa355e49d100f247ff9eaea1 SHA1 0418d2aa6749fa1d814d30088fc549b4337f7e90 SHA256 55cf1c53fe29e6e6354ed7837fcefc88ce03b763dbe5c5288e198d1575f6dc19 +AUX dhcp_probe_mail 627 RMD160 67f8d1fff3882a1ec5423b37382eb4b1292297c7 SHA1 bac0ee9cc1fc42b4b3e01d8547d055539520ef16 SHA256 13837b61cf7e29e311b5cf81fc7cad93d42ceecea76777e1a4e9ae8667d98341 +DIST dhcp_probe-1.3.0.tar.gz 211613 RMD160 fb988165ced12e5baf95ffe030b72999b52d2624 SHA1 c25796bbf70ecffd285ce40ec8bb9956e4654ad1 SHA256 227cd6a82a7fa4d989994cb076f18092bc2c82592ceaeb31c4fdd09294b9265f +EBUILD dhcp_probe-1.3.0.ebuild 1040 RMD160 1d55ef03e90e9a4ccc29558a2dc3813cced6c271 SHA1 706f60e8bcaaa04db4653306e6a9c7e405e60eda SHA256 1e9b6488abe473b7b7835a1ff506d98f19ede1b159ffdadb215cccf5dea9f5a7 +MISC ChangeLog 434 RMD160 16767d5135a9e0600f1a79262c4bad4f3bd05a58 SHA1 dc01d5270e9436611fbae147899520db6355bbb9 SHA256 e6b175050de53d3105aab5390be624a6d748093c0eea00c379df65b500a2ae15 +MISC metadata.xml 387 RMD160 8f48f50bd1b2b6a20fec6089c4e100fbf48167c0 SHA1 fd421b76d2e5756376e3dd65c2f381473e61c1bf SHA256 8ba4bcc9c0681fc85e79fa71905f1a4176170e0ee068593e614a961a739174a9 diff --git a/net-analyzer/dhcp_probe/dhcp_probe-1.3.0.ebuild b/net-analyzer/dhcp_probe/dhcp_probe-1.3.0.ebuild new file mode 100644 index 000000000000..ec1ebd785de0 --- /dev/null +++ b/net-analyzer/dhcp_probe/dhcp_probe-1.3.0.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/dhcp_probe/dhcp_probe-1.3.0.ebuild,v 1.1 2009/05/26 00:00:55 jer Exp $ + +EAPI="2" + +DESCRIPTION="dchp_probe attempts to discover DHCP and BootP servers on a directly-attached Ethernet network" +HOMEPAGE="http://www.net.princeton.edu/software/dhcp_probe/" +SRC_URI="http://www.net.princeton.edu/software/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86" +IUSE="" + +DEPEND=" + net-libs/libpcap + >=net-libs/libnet-1.1.2.1-r2 + " +RDEPEND="${DEPEND}" + +src_configure() { + STRIP=true econf || die "econf failed" +} + +src_install() { + newinitd "${FILESDIR}/${PN}.initd" ${PN} + newconfd "${FILESDIR}/${PN}.confd" ${PN} + dobin src/dhcp_probe "${FILESDIR}"/dhcp_probe_mail || die "dobin failed" + dodoc \ + extras/dhcp_probe.cf.sample \ + NEWS \ + README \ + ChangeLog \ + AUTHORS \ + TODO \ + || die "dodoc failed" + doman \ + doc/dhcp_probe.8 \ + doc/dhcp_probe.cf.5 \ + || die "doman failed" +} diff --git a/net-analyzer/dhcp_probe/files/dhcp_probe.confd b/net-analyzer/dhcp_probe/files/dhcp_probe.confd new file mode 100644 index 000000000000..61e4582cade9 --- /dev/null +++ b/net-analyzer/dhcp_probe/files/dhcp_probe.confd @@ -0,0 +1,6 @@ +# Config file for /etc/init.d/dhcp_probe + +# For more information, see dhcp_probe(8). + +DHCP_PROBE_OPTIONS="-d 1" + diff --git a/net-analyzer/dhcp_probe/files/dhcp_probe.initd b/net-analyzer/dhcp_probe/files/dhcp_probe.initd new file mode 100644 index 000000000000..4f13e5ba9d96 --- /dev/null +++ b/net-analyzer/dhcp_probe/files/dhcp_probe.initd @@ -0,0 +1,48 @@ +#!/sbin/runscript +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/dhcp_probe/files/dhcp_probe.initd,v 1.1 2009/05/26 00:00:55 jer Exp $ + +opts="reload" + +DHCP_PROBE_BINARY="/usr/bin/dhcp_probe" +DHCP_PROBE_CONFIG="/etc/dhcp_probe.cf" +DHCP_PROBE_PIDFILE="/var/run/${SVCNAME}.pid" +DHCP_PROBE_INTERFACE="${SVCNAME#*.}" + +depend() { + use logger + need net +} + +checkconfig() { + if [ ! -e ${DHCP_PROBE_CONFIG} ]; then + eerror "You need an ${DHCP_PROBE_CONFIG} to run dhcp_probe." + eerror "A sample file is available in /usr/share/doc/dhcp_probe*" + return 1 + elif [ ${SVCNAME} = dhcp_probe ]; then + eerror "Do not run this script directly! Instead, create symbolic links like so:" + eerror " # cd /etc/init.d" + eerror " # ln -s dhcp_probe dhcp_probe.[INTERFACE_NAME]" + eerror "for each interface that should be monitored" + return 1 + fi +} + +start() { + checkconfig + ebegin "Starting ${SVCNAME}" + ${DHCP_PROBE_BINARY} ${DHCP_PROBE_OPTIONS} -p ${DHCP_PROBE_PIDFILE} ${DHCP_PROBE_INTERFACE} + eend ${?} +} + +stop() { + if [ "${RC_CMD}" = "restart" ] ; then + checkconfig || return 1 + fi + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --signal 9 \ + --pidfile ${DHCP_PROBE_PIDFILE} + eend ${?} +} + diff --git a/net-analyzer/dhcp_probe/files/dhcp_probe_mail b/net-analyzer/dhcp_probe/files/dhcp_probe_mail new file mode 100644 index 000000000000..58b07766bbb3 --- /dev/null +++ b/net-analyzer/dhcp_probe/files/dhcp_probe_mail @@ -0,0 +1,23 @@ +#!/bin/bash +# Old style alert program: +# +# Syntax: +# alert_program_name /absolute/path/name +# +# The program specified via 'alert_program_name' will be called as follows: +# /absolute/path/name name_of_calling_program name_of_interface_on_which_the +#_response_was_received IP_source_of_the_response ether_src_of_the_response + +DHCP_PROBE_DOMAIN=$(dnsdomainname) + +sendmail root <<EOF +From: root@${DHCP_PROBE_DOMAIN} +Subject: $1 ALERT - $3 is acting as a DHCP server + +Called program: $0 +Calling program: $1 +Interface on which response was received: $2 +IP source of the response: $3 +Ethernet source of the response: $4 + +EOF diff --git a/net-analyzer/dhcp_probe/metadata.xml b/net-analyzer/dhcp_probe/metadata.xml new file mode 100644 index 000000000000..bfc69c95fdfb --- /dev/null +++ b/net-analyzer/dhcp_probe/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>netmon</herd> + <maintainer> + <email>jer@gentoo.org</email> + <name>Jeroen Roovers</name> + </maintainer> + <longdescription> + dchp_probe attempts to discover DHCP and BootP servers on a + directly-attached Ethernet network + </longdescription> +</pkgmetadata> |