From submitter:

I've noticed that on some 'unsymmetric' locales/charsets, the
    lower/uppercase conversion in the tspc-scripts fails on FreeBSD
    5.x (caused by tr being changed to behave posixly correct). The
    fix is easy, see attached patch.

Submitted by:	Michael Nottebrock <michaelnottebrock@gmx.net>
This commit is contained in:
Edwin Groothuis 2004-05-22 02:14:02 +00:00
parent 360f00838d
commit c25412ecc0
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=109677
3 changed files with 26 additions and 7 deletions

View file

@ -7,6 +7,7 @@
PORTNAME= freenet6
PORTVERSION= 1.0
PORTREVISION= 1
CATEGORIES= net ipv6
MASTER_SITES= # fetch manually
DISTNAME= ${PORTNAME}-client-${PORTVERSION}
@ -24,7 +25,7 @@ USE_REINPLACE= yes
MAN8= tspc.8
MAN5= tspc.conf.5
PKGMESSAGE= ${WRKSRC}/pkg-message
PKGMESSAGE= ${WRKDIR}/pkg-message
.include <bsd.port.pre.mk>
@ -69,8 +70,8 @@ post-patch:
@${CP} ${FILESDIR}/freenet6.sh.in ${WRKSRC}/freenet6.sh
@${REINPLACE_CMD} -e "s|@@PREFIX@@|${PREFIX}|g" ${WRKSRC}/freenet6.sh
@${CP} ${FILESDIR}/pkg-message.in ${WRKSRC}/pkg-message
@${REINPLACE_CMD} -e "s|@@PREFIX@@|${PREFIX}|g" ${WRKSRC}/pkg-message
@${CP} ${FILESDIR}/pkg-message.in ${WRKDIR}/pkg-message
@${REINPLACE_CMD} -e "s|@@PREFIX@@|${PREFIX}|g" ${WRKDIR}/pkg-message
@${REINPLACE_CMD} -e "s|@@PREFIX@@|${PREFIX}|g" \
${WRKSRC}/man/man8/tspc.8

View file

@ -1,8 +1,17 @@
--- template/freebsd4.sh.orig Thu Oct 11 16:40:29 2001
+++ template/freebsd4.sh Thu Oct 11 16:40:48 2001
@@ -110,6 +110,9 @@
@@ -92,7 +92,7 @@
fi
#change to upper case
-TSP_HOST_TYPE=`echo $TSP_HOST_TYPE | tr a-z A-Z`
+TSP_HOST_TYPE=`echo $TSP_HOST_TYPE | tr [:lower:] [:upper:]`
if [ X"${TSP_HOST_TYPE}" = X"HOST" ] || [ X"${TSP_HOST_TYPE}" = X"ROUTER" ]; then
#
@@ -122,6 +122,9 @@
# Delete any default IPv6 route first
Exec $route delete -inet6 default
ExecNoCheck $route delete -inet6 default
Exec $route add -inet6 default -interface $TSP_TUNNEL_INTERFACE
+
+ # Save interface for later

View file

@ -8,7 +8,16 @@
ifconfig=/sbin/ifconfig
route=/sbin/route
rtadvd=/usr/sbin/rtadvd
@@ -104,7 +103,7 @@
@@ -89,7 +88,7 @@
fi
#change to upper case
-TSP_HOST_TYPE=`echo $TSP_HOST_TYPE | tr a-z A-Z`
+TSP_HOST_TYPE=`echo $TSP_HOST_TYPE | tr [:lower:] [:upper:]`
if [ X"${TSP_HOST_TYPE}" = X"HOST" ] || [ X"${TSP_HOST_TYPE}" = X"ROUTER" ]; then
#
@@ -103,7 +102,7 @@
Exec $ifconfig $TSP_TUNNEL_INTERFACE destroy
fi
Exec $ifconfig $TSP_TUNNEL_INTERFACE create
@ -17,7 +26,7 @@
#
# Configured tunnel config (IPv6)
@@ -118,6 +117,9 @@
@@ -117,6 +116,9 @@
# Delete any default IPv6 route first
ExecNoCheck $route delete -inet6 default
Exec $route add -inet6 default $TSP_SERVER_ADDRESS_IPV6