ports/110716: nstxd port

Nagilum freebsd at nagilum.org
Fri Mar 23 14:20:05 UTC 2007


>Number:         110716
>Category:       ports
>Synopsis:       nstxd port
>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 Mar 23 14:20:04 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Nagilum
>Release:        FreeBSD 6.2-STABLE i386
>Organization:
private
>Environment:
System: FreeBSD cakebox.tis 6.2-STABLE FreeBSD 6.2-STABLE #5: Wed Jan 17 12:35:57 CET 2007 root at cakebox.tis:/usr/obj/export/src/sys/cakebox i386

Description:
	A port of the nstxd.
	I'll also do a port of the corresponding client once this one
	has been accepted.

Fix:

	Install the attached port :)

--- nstx-server.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	nstx-server
#	nstx-server/Makefile
#	nstx-server/distinfo
#	nstx-server/pkg-descr
#	nstx-server/pkg-plist
#	nstx-server/pkg-message
#	nstx-server/files
#	nstx-server/files/nstxd.in
#
echo c - nstx-server
mkdir -p nstx-server > /dev/null 2>&1
echo x - nstx-server/Makefile
sed 's/^X//' >nstx-server/Makefile << 'END-of-nstx-server/Makefile'
X# New ports collection makefile for:   nstx-server
X# Date created:        1 April 2007
X# Whom:                nagilum
X#
X# $FreeBSD$
X#
X
XPORTNAME=	nstx-server
XPORTVERSION=	1.1b6
XCATEGORIES=	net
XMASTER_SITES=	http://www.nagilum.org/nstx/ http://ftp.debian.org/debian/pool/main/n/nstx/
X#DISTNAME=	nstx-1.1-beta6
XDISTFILES=	nstx_1.1-beta6.orig.tar.gz
X
XPATCHFILES=	nstx_1.1-beta6-4.diff.gz
XPATCH_SITES=	http://www.nagilum.org/nstx/ http://ftp.debian.org/debian/pool/main/n/nstx/
XPATCH_DIST_STRIP=	-p1
X
XMAINTAINER=	freebsd at nagilum.org
XCOMMENT=	DNS tunnel server
X
XMAN8=		nstxd.8
XMANCOMPRESSED=	yes
XUSE_RC_SUBR+=	nstxd
X
XWRKSRC=		${WRKDIR}/nstx-1.1-beta6
X
XALL_TARGET=	nstxd
XINSTALL_TARGET=	nstxd
X
Xpost-install:
X	${INSTALL_PROGRAM} ${WRKSRC}/nstxd ${PREFIX}/sbin
X	${INSTALL_MAN} ${WRKSRC}/nstxd.8 ${PREFIX}/man/man8/
X.if !defined(NOPORTDOCS)
X	${MKDIR} -p ${DOCSDIR}
X	${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}/
X	@${CAT} pkg-message
X.endif	#NOPORTDOCS
X
X.include <bsd.port.mk>
END-of-nstx-server/Makefile
echo x - nstx-server/distinfo
sed 's/^X//' >nstx-server/distinfo << 'END-of-nstx-server/distinfo'
XMD5 (nstx_1.1-beta6.orig.tar.gz) = 275abd75a856b07a798b1f2360088cf5
XSHA256 (nstx_1.1-beta6.orig.tar.gz) = 57a1962a66e9cb64fe70839d852c56cd253092260eab589a8173740b75b21450
XSIZE (nstx_1.1-beta6.orig.tar.gz) = 20458
XMD5 (nstx_1.1-beta6-4.diff.gz) = 6c071c5179bfa62917842dd32080c139
XSHA256 (nstx_1.1-beta6-4.diff.gz) = f2fc046cc08831599f2a95c874b7a028238c73e1f2cd4964ee86aa4c4307b8a8
XSIZE (nstx_1.1-beta6-4.diff.gz) = 7743
END-of-nstx-server/distinfo
echo x - nstx-server/pkg-descr
sed 's/^X//' >nstx-server/pkg-descr << 'END-of-nstx-server/pkg-descr'
Xnstxd allows a nstx client daemon to tunnel IP traffic through DNS requests
Xto the machine running nstxd.
XSee %%PREFIX%%/share/doc/nstxd/README for more!
END-of-nstx-server/pkg-descr
echo x - nstx-server/pkg-plist
sed 's/^X//' >nstx-server/pkg-plist << 'END-of-nstx-server/pkg-plist'
Xsbin/nstxd
X%%PORTDOCS%%%%DOCSDIR%%/README
X%%PORTDOCS%%@dirrm %%DOCSDIR%%
END-of-nstx-server/pkg-plist
echo x - nstx-server/pkg-message
sed 's/^X//' >nstx-server/pkg-message << 'END-of-nstx-server/pkg-message'
XYou need to be able to specify this host in the NS record of a domainname to use this program.
XSee ${PREFIX}/share/doc/nstxd/README for details!
END-of-nstx-server/pkg-message
echo c - nstx-server/files
mkdir -p nstx-server/files > /dev/null 2>&1
echo x - nstx-server/files/nstxd.in
sed 's/^X//' >nstx-server/files/nstxd.in << 'END-of-nstx-server/files/nstxd.in'
X#!/bin/sh
X#
X# $Id$
X#
X
X# PROVIDE: nstxd
X# REQUIRE: DAEMON
X
X#
X# Add the following lines to /etc/rc.conf to enable nstxd:
X#
X#nstxd_domain="<your nstx domain>"
X#
X# You can disable automatic startup specifying:
X#
X#nstxd_enable="NO"
X#
X# See nstxd(8) for flags.
X#
X# The default behavour of this script is to bind nstxd to the IP 
X# of the interface with default route.
X# If you want it bind to the IP of a different interface you
X# specify this interface in /etc/rc.conf:
X#nstxd_interface="fxp0"
X# If you have static IPs or you want nstxd to listen only a
X# specific IP (e.g. 127.0.0.1) you can specify:
X#nstxd_ip="127.0.0.1"
X# in /etc/rc.conf
X# 
X# This script can also take care of the tun interface configuration
X# you simply put something like
X#nstxd_ifconfig="172.16.1.1 172.16.1.2"
X# in /etc/rc.conf to have this script automatically run
X# ifconfig with the above parameter on the device opened by nstxd.
X#
X. %%RC_SUBR%%
X
Xname=nstxd
Xrcvar=`set_rcvar`
X
Xcommand=%%PREFIX%%/sbin/nstxd
X
Xload_rc_config ${name}
X
X# set defaults
Xnstxd_interface=${nstxd_interface:-$(route get default|grep interface|cut -d: -f2)}
Xnstxd_ip=${nstxd_ip:-$(ifconfig ${nstxd_interface}|grep "inet "|xargs|cut -d' ' -f 2)}
X
Xif [ -n "${nstxd_domain}" ]
Xthen	nstxd_enable=${nstxd_enable:-"YES"}
Xelse	nstxd_enable="NO"
Xfi
X
Xnstxd_flags=${nstxd_flags:-"-D -i ${nstxd_ip} ${nstxd_domain}"}
X
Xtmpfile=$(mktemp /tmp/$(basename $0).XXXXXX) || exit 1
Xrun_rc_command "$1" 2>&1|tee ${tmpfile}
Xnstx_if=$(grep "using device" ${tmpfile}|cut -d' ' -f5)
Xrm -f ${tmpfile}
X
Xif [ -n "${nstxd_ifconfig}" -a -n "${nstx_if}" ]
Xthen	echo "Configuring nstx interface: ifconfig ${nstx_if} ${nstxd_ifconfig} up"
X	ifconfig ${nstx_if} ${nstxd_ifconfig}
Xfi
X
END-of-nstx-server/files/nstxd.in
exit
--- nstx-server.shar ends here ---


>Description:
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list