aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorBeech Rintoul <beech@FreeBSD.org>2011-12-31 22:14:33 +0000
committerBeech Rintoul <beech@FreeBSD.org>2011-12-31 22:14:33 +0000
commita69212da23998d04065a700194c74586c9bda053 (patch)
treee1b7cda4fcabec4f430417549820d0df33249ec2 /net
parentaf725a7b77d4e426a7ff65f2ed8781c9eaf4a617 (diff)
downloadports-a69212da23998d04065a700194c74586c9bda053.tar.gz
ports-a69212da23998d04065a700194c74586c9bda053.zip
Notes
Diffstat (limited to 'net')
-rw-r--r--net/ndisc6/Makefile3
-rw-r--r--net/ndisc6/files/patch-rdnssd-merge-hook.in28
-rw-r--r--net/ndisc6/files/patch-src-ndisc.c10
-rw-r--r--net/ndisc6/files/rdnssd.in24
4 files changed, 60 insertions, 5 deletions
diff --git a/net/ndisc6/Makefile b/net/ndisc6/Makefile
index 4a47b0cabfcf..8da80397b89c 100644
--- a/net/ndisc6/Makefile
+++ b/net/ndisc6/Makefile
@@ -7,6 +7,7 @@
PORTNAME= ndisc6
PORTVERSION= 1.0.2
+PORTREVISION= 1
CATEGORIES= net ipv6
MASTER_SITES= http://www.remlab.net/files/ndisc6/ \
http://people.via.ecp.fr/~rem/www.remlab.net/files/ndisc6/
@@ -39,6 +40,8 @@ MLINKS= rltraceroute6.8 tcptraceroute6.8 \
addr2name.1 name2addr.1 \
tcpspray.1 tcpspray6.1
+USE_RC_SUBR= rdnssd
+
PORTDOCS= AUTHORS NEWS README
post-install:
diff --git a/net/ndisc6/files/patch-rdnssd-merge-hook.in b/net/ndisc6/files/patch-rdnssd-merge-hook.in
new file mode 100644
index 000000000000..a40c66df2cad
--- /dev/null
+++ b/net/ndisc6/files/patch-rdnssd-merge-hook.in
@@ -0,0 +1,28 @@
+--- rdnssd/merge-hook.in.orig 2011-09-30 17:29:15.000000000 +0200
++++ rdnssd/merge-hook.in 2011-09-30 17:29:53.000000000 +0200
+@@ -21,7 +21,7 @@
+
+ set -e
+
+-PATH=/sbin:/bin
++PATH=/sbin:/bin:/usr/bin
+
+ # Max number of nameserver options taken into account. Should be as
+ # defined in <resolv.h>
+@@ -33,14 +33,14 @@
+ # will limit the IPv6 entries it adds to $RDNSS_LIMIT only.
+ RDNSS_LIMIT=$(($MAXNS - 1))
+
+-sysconfdir='@SYSCONFDIR@'
++sysconfdir='/etc'
+ localstatedir='@LOCALSTATEDIR@'
+ resolvconf="$sysconfdir/resolv.conf"
+ myresolvconf="$localstatedir/run/rdnssd/resolv.conf"
+
+ # These should be POSIX-compliant BREs
+ RE_NSV4='^nameserver *\([0-9]\{1,3\}\.\)\{3,3\}[0-9]\{1,3\} *$'
+-RE_NSV4OR6='^nameserver *[a-fA-F0-9:\.]\{1,46\}\(%[a-zA-Z0-9]\{1,\}\)\{,1\} *$'
++RE_NSV4OR6='^nameserver *[a-fA-F0-9:\.]\{1,46\}\(%[a-zA-Z0-9]\{1,\}\)\{0,1\} *$'
+
+ # Count how many IPv6 nameservers we can fit
+
diff --git a/net/ndisc6/files/patch-src-ndisc.c b/net/ndisc6/files/patch-src-ndisc.c
index e2b49166603f..0b1fa047e1c9 100644
--- a/net/ndisc6/files/patch-src-ndisc.c
+++ b/net/ndisc6/files/patch-src-ndisc.c
@@ -1,11 +1,11 @@
---- src/ndisc.c.orig 2011-09-10 14:17:49.714181834 +0400
-+++ src/ndisc.c 2011-09-10 14:17:51.893973268 +0400
-@@ -440,8 +440,6 @@
- gettext ((v & ND_RA_FLAG_MANAGED) ? N_ ("Yes") : N_("No")));
+--- src/ndisc.c.orig 2011-09-10 14:17:49.714181834 +0400
++++ src/ndisc.c 2011-09-10 14:17:51.893973268 +0400
+@@ -441,7 +441,7 @@
printf (_("Stateful other conf. : %3s\n"),
gettext ((v & ND_RA_FLAG_OTHER) ? N_ ("Yes") : N_("No")));
-- printf (_("Mobile home agent : %3s\n"),
+ printf (_("Mobile home agent : %3s\n"),
- gettext ((v & ND_RA_FLAG_HOME_AGENT) ? N_ ("Yes") : N_("No")));
++ gettext ((v & ND_RA_FLAG_HA) ? N_ ("Yes") : N_("No")));
printf (_("Router preference : %6s\n"), pref_i2n (v));
printf (_("Neighbor discovery proxy : %3s\n"),
gettext ((v & 0x04) ? N_ ("Yes") : N_("No")));
diff --git a/net/ndisc6/files/rdnssd.in b/net/ndisc6/files/rdnssd.in
new file mode 100644
index 000000000000..63bc70032dc9
--- /dev/null
+++ b/net/ndisc6/files/rdnssd.in
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+# PROVIDE: rdnssd
+# REQUIRE: NETWORKING
+
+#
+# Add the following line to /etc/rc.conf to enable rdnssd:
+#
+# rdnssd_enable="YES"
+#
+
+. /etc/rc.subr
+
+name=rdnssd
+rcvar=`set_rcvar`
+
+pidfile=/var/run/${name}.pid
+command="%%PREFIX%%/sbin/${name}"
+command_args="-p ${pidfile}"
+
+load_rc_config $name
+: ${rdnssd_enable="NO"}
+
+run_rc_command "$1"