ports/161172: [maintainer] [patch] net/ndisc6: add rc.d script for rdnssd and make merge-hook working
Mikhail T.
m.tsatsenko at gmail.com
Fri Sep 30 21:00:23 UTC 2011
>Number: 161172
>Category: ports
>Synopsis: [maintainer] [patch] net/ndisc6: add rc.d script for rdnssd and make merge-hook working
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Fri Sep 30 21:00:22 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Mikhail T.
>Release: 9.0
>Organization:
>Environment:
FreeBSD g28 9.0-BETA3 FreeBSD 9.0-BETA3 #2 r225884M: Fri Sep 30 18:43:47 MSK 2011 root at g28:/usr/obj/usr/src/sys/NODEBUG amd64
>Description:
- Add startup script for rdnssd
- Make merge-hook usable
- Change ND_RA_FLAG_HOME_AGENT to ND_RA_FLAG_HA instead of deletion
- Bump PORTREVISION (?)
Submited by: Cejka Rudolf cejkar <at> fit <dot> vutbr <dot> cz (via private email)
>How-To-Repeat:
>Fix:
Patch attached with submission follows:
Index: ndisc6/Makefile
===================================================================
RCS file: /home/ncvs/ports/net/ndisc6/Makefile,v
retrieving revision 1.15
diff -u -r1.15 Makefile
--- ndisc6/Makefile 13 Sep 2011 17:05:25 -0000 1.15
+++ ndisc6/Makefile 30 Sep 2011 20:49:30 -0000
@@ -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 @@
addr2name.1 name2addr.1 \
tcpspray.1 tcpspray6.1
+USE_RC_SUBR= rdnssd
+
PORTDOCS= AUTHORS NEWS README
post-install:
Index: ndisc6/files/patch-rdnssd-merge-hook.in
===================================================================
RCS file: ndisc6/files/patch-rdnssd-merge-hook.in
diff -N ndisc6/files/patch-rdnssd-merge-hook.in
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ndisc6/files/patch-rdnssd-merge-hook.in 30 Sep 2011 20:49:30 -0000
@@ -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
+
Index: ndisc6/files/patch-rdnssd-rdnssd.c
===================================================================
RCS file: ndisc6/files/patch-rdnssd-rdnssd.c
diff -N ndisc6/files/patch-rdnssd-rdnssd.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ndisc6/files/patch-rdnssd-rdnssd.c 30 Sep 2011 20:49:30 -0000
@@ -0,0 +1,10 @@
+--- rdnssd/rdnssd.c.orig 2011-09-10 14:20:44.451134584 +0400
++++ rdnssd/rdnssd.c 2011-09-10 14:21:09.758658207 +0400
+@@ -29,6 +29,7 @@
+ #include <stdbool.h>
+ #include <locale.h>
+ #include <signal.h>
++#include <stdint.h>
+
+ #include <sys/types.h>
+ #include <sys/stat.h>
Index: ndisc6/files/patch-src-ndisc.c
===================================================================
RCS file: ndisc6/files/patch-src-ndisc.c
diff -N ndisc6/files/patch-src-ndisc.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ndisc6/files/patch-src-ndisc.c 30 Sep 2011 20:49:30 -0000
@@ -0,0 +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
+@@ -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"),
+- 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")));
Index: ndisc6/files/rdnssd.in
===================================================================
RCS file: ndisc6/files/rdnssd.in
diff -N ndisc6/files/rdnssd.in
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ndisc6/files/rdnssd.in 30 Sep 2011 20:49:30 -0000
@@ -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"
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list