1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-25 04:43:33 +00:00

- 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

PR:		ports/161172
Submitted by:	Mikhail T. <m.tsatsenko@gmail.com>
This commit is contained in:
Beech Rintoul 2011-12-31 22:14:33 +00:00
parent af725a7b77
commit a69212da23
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=288359
4 changed files with 60 additions and 5 deletions

View File

@ -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:

View File

@ -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

View File

@ -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")));

View File

@ -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"