summaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorFrancesco Colista <francesco.colista@gmail.com>2012-08-24 16:16:20 +0000
committerFrancesco Colista <francesco.colista@gmail.com>2012-08-24 16:16:20 +0000
commitb1a6eabbae6254aa301adc64bc367ab333a5f073 (patch)
tree62f59dbf3fac731b1a7a22eb2685e37a0689c20a /testing
parent0dee35fcb6a50b1e519b8926db2975251604498d (diff)
downloadaports-b1a6eabbae6254aa301adc64bc367ab333a5f073.tar.bz2
aports-b1a6eabbae6254aa301adc64bc367ab333a5f073.tar.xz
testing/dhcp-probe: added initd and confd files
Diffstat (limited to 'testing')
-rw-r--r--testing/dhcp-probe/APKBUILD17
-rw-r--r--testing/dhcp-probe/dhcp-probe.confd14
-rw-r--r--testing/dhcp-probe/dhcp-probe.initd21
3 files changed, 49 insertions, 3 deletions
diff --git a/testing/dhcp-probe/APKBUILD b/testing/dhcp-probe/APKBUILD
index 6e1d12c7a..58ded1a2b 100644
--- a/testing/dhcp-probe/APKBUILD
+++ b/testing/dhcp-probe/APKBUILD
@@ -3,7 +3,7 @@
pkgname=dhcp-probe
_pkgname=dhcp_probe
pkgver=1.3.0
-pkgrel=0
+pkgrel=1
pkgdesc="Allows network administrators to make calculations that will assist in subnetting a network"
url="http://www.net.princeton.edu/software/dhcp_probe/"
arch="all"
@@ -13,7 +13,9 @@ depends_dev="libnet-dev libpcap-dev"
makedepends="$depends_dev"
install=""
subpackages="$pkgname-doc"
-source="http://www.net.princeton.edu/software/$_pkgname/$_pkgname-$pkgver.tar.gz"
+source="http://www.net.princeton.edu/software/$_pkgname/$_pkgname-$pkgver.tar.gz
+ $pkgname.initd
+ $pkgname.confd"
_builddir="$srcdir"/$_pkgname-$pkgver
prepare() {
local i
@@ -32,5 +34,14 @@ build() {
package() {
cd "$_builddir"
make DESTDIR="$pkgdir" install
+ mkdir -p "$srcdir"/etc/dhcp-probe
+ install -Dm755 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname || return 1
+ install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname || return 1
+ install -Dm755 "$_builddir"/extras/dhcp_probe.cf.sample "$pkgdir"/etc/dhcp-probe/dhcp_probe.cf || return 1
+ for f in dhcp_probe_notify dhcp_probe_notify2 mail-throttled; do
+ install -Dm755 "$_builddir"/extras/$f "$pkgdir"/etc/dhcp-probe/$f || return 1
+ done
}
-md5sums="8067e696fbd88120bdcc2ffef4b64da2 dhcp_probe-1.3.0.tar.gz"
+md5sums="8067e696fbd88120bdcc2ffef4b64da2 dhcp_probe-1.3.0.tar.gz
+d69a227cd436b60f918633a7f7ac7034 dhcp-probe.initd
+1ffbda883f84af0daf5a2992370de643 dhcp-probe.confd"
diff --git a/testing/dhcp-probe/dhcp-probe.confd b/testing/dhcp-probe/dhcp-probe.confd
new file mode 100644
index 000000000..0dee6058c
--- /dev/null
+++ b/testing/dhcp-probe/dhcp-probe.confd
@@ -0,0 +1,14 @@
+#-d debuglevel enable debugging at specified level
+#-f don't fork (only use for debugging)
+#-l log_file log to file instead of syslog
+#-o capture_file enable capturing of unexpected answers
+#-p pid_file override default pid file [/var/run/dhcp_probe.pid]
+#-Q vlan_id tag outgoing frames with an 802.1Q VLAN ID
+#-s capture_bufsize override default capture bufsize [30280]
+#-T enable the socket receive timeout feature
+#-w cwd override default working directory [/]
+
+INTERFACE=eth0
+CONFIGFILE="/etc/dhcp-probe/dhcp_probe.cf"
+PID="/var/run/dhcp_probe.pid"
+PARAMS="-c $CONFIGFILE -p $PID $INTERFACE"
diff --git a/testing/dhcp-probe/dhcp-probe.initd b/testing/dhcp-probe/dhcp-probe.initd
new file mode 100644
index 000000000..ba08560b3
--- /dev/null
+++ b/testing/dhcp-probe/dhcp-probe.initd
@@ -0,0 +1,21 @@
+#!/sbin/runscript
+
+depend() {
+ need net
+ use syslog
+
+}
+
+start() {
+ ebegin "Starting DHCP Probe"
+ start-stop-daemon --start --quiet --background --make-pidfile \
+ --pidfile /var/run/dhcp_probe.pid --exec /usr/sbin/dhcp_probe \
+ -- $PARAMS
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping DHCP Probe"
+ start-stop-daemon --stop --quiet --pidfile /var/run/dhcp_probe.pid
+ eend $?
+}