diff --git a/dns/noip/Makefile b/dns/noip/Makefile new file mode 100644 index 000000000000..96f654c96246 --- /dev/null +++ b/dns/noip/Makefile @@ -0,0 +1,43 @@ +# New ports collection makefile for: No-IP Dynamic Update Client +# Date created: 28 March 2002 +# Whom: Eyal Soha +# +# $FreeBSD$ +# + +PORTNAME= noip +PORTVERSION= 1.6 +CATEGORIES= net +MASTER_SITES= http://www.no-ip.com/client/linux/ +DISTNAME= noip_updater_v${PORTVERSION} + +MAINTAINER= esoha@attbi.com + +ALL_TARGET= noip + +post-build: + ${SED} "s|%%PREFIX%%|${PREFIX}|g" < ${FILESDIR}/noip.sh > ${WRKSRC}/noip.sh + +pre-install: + @${SETENV} PKG_PREFIX=${PREFIX} ${SH} \ + ${PKGINSTALL} ${PKGNAME} PRE-INSTALL + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/noip ${PREFIX}/bin + ${INSTALL_SCRIPT} ${WRKSRC}/noip.sh ${PREFIX}/etc/rc.d +.if !defined(NOPORTDOCS) + ${MKDIR} ${PREFIX}/share/doc/${PORTNAME} + ${INSTALL_MAN} ${WRKSRC}/README.FIRST ${PREFIX}/share/doc/${PORTNAME} + ${INSTALL_MAN} ${WRKSRC}/COPYING ${PREFIX}/share/doc/${PORTNAME} + ${MKDIR} ${PREFIX}/share/examples/${PORTNAME} + ${INSTALL_MAN} ${WRKSRC}/no-ip.conf.sample ${PREFIX}/share/examples/${PORTNAME} + ${INSTALL_SCRIPT} ${WRKSRC}/no-ip.sh ${PREFIX}/share/examples/${PORTNAME} +.endif + @${SED} "s|%%PREFIX%%|${PREFIX}|g" ${PKGMESSAGE} | ${SED} "s|%%WRKSRC%%|${WRKSRC}|g" + +conf: + (cd ${PREFIX}/etc && ${PREFIX}/share/examples/noip/no-ip.sh) + ${CHOWN} noip:noip ${PREFIX}/etc/no-ip.conf + ${CHMOD} 0600 ${PREFIX}/etc/no-ip.conf + +.include diff --git a/dns/noip/distinfo b/dns/noip/distinfo new file mode 100644 index 000000000000..41d0c1e0f8ff --- /dev/null +++ b/dns/noip/distinfo @@ -0,0 +1 @@ +MD5 (noip_updater_v1.6.tar.gz) = 6503e2e7d8ea35c304744a318b400a09 diff --git a/dns/noip/files/noip.sh b/dns/noip/files/noip.sh new file mode 100644 index 000000000000..eca1af8323b8 --- /dev/null +++ b/dns/noip/files/noip.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +case "$1" in + start) + if [ -x %%PREFIX%%/bin/noip -a -f %%PREFIX%%/etc/no-ip.conf ]; then + echo -n ' noip'; + su -m noip -c '%%PREFIX%%/bin/noip' 2> /dev/null > /dev/null + fi + ;; + stop) + echo -n ' noip'; + killall noip + ;; + *) + echo "Usage: `basename $0` {start|stop}" >&2 + exit 1 + ;; +esac +exit 0 diff --git a/dns/noip/files/patch-no-ip.sh b/dns/noip/files/patch-no-ip.sh new file mode 100644 index 000000000000..4d083a0ec7b6 --- /dev/null +++ b/dns/noip/files/patch-no-ip.sh @@ -0,0 +1,16 @@ +--- no-ip.sh.orig Wed Oct 10 16:35:12 2001 ++++ no-ip.sh Fri Mar 29 01:55:11 2002 +@@ -1,3 +1,4 @@ ++#!/bin/sh + # + # configuration file builder script for no-ip + # +@@ -89,7 +90,7 @@ + # + if [ "$NAT" = "N" ] + then +- devs=`tail +3 /proc/net/dev | awk -F: '{print $1}' | tr -d ' '|tr '\n' ' '` ++ devs=`ifconfig -l inet` + DEV=foo + while [ "$DEV" = "foo" ] + do diff --git a/dns/noip/files/patch-noip.c b/dns/noip/files/patch-noip.c new file mode 100644 index 000000000000..04b51cdfffd6 --- /dev/null +++ b/dns/noip/files/patch-noip.c @@ -0,0 +1,12 @@ +--- noip.c.bak Sat Mar 30 17:59:58 2002 ++++ noip.c Sat Mar 30 17:59:15 2002 +@@ -452,7 +452,8 @@ + else + getip(IPaddress); + #ifdef DEBUG +- ErrMsg("! LIA = %s, IP = %s",Last_IP_Addr, IPaddress); ++ if (debug) ++ ErrMsg("! LIA = %s, IP = %s",Last_IP_Addr, IPaddress); + #endif + if ((*IPaddress != 0) && + (strcmp(IPaddress, Last_IP_Addr) != 0)) { diff --git a/dns/noip/pkg-comment b/dns/noip/pkg-comment new file mode 100644 index 000000000000..608172d2c32d --- /dev/null +++ b/dns/noip/pkg-comment @@ -0,0 +1 @@ +No-IP.com's dynamic DNS update client diff --git a/dns/noip/pkg-deinstall b/dns/noip/pkg-deinstall new file mode 100644 index 000000000000..93a3036c7d43 --- /dev/null +++ b/dns/noip/pkg-deinstall @@ -0,0 +1,21 @@ +#!/bin/sh + +if [ "$2" != "POST-DEINSTALL" ]; then + exit 0 +fi + +PW=/usr/sbin/pw +ECHO=echo +USER=noip +GROUP=${USER} + +if [ -f ${PKG_PREFIX}/etc/no-ip.conf ]; then + ${ECHO} "To delete noip configuration permanently: rm ${PKG_PREFIX}/etc/no-ip.conf" +fi +if ${PW} usershow "${USER}" 2>/dev/null 1>&2; then + ${ECHO} "To delete noip user permanently: ${PW} userdel ${USER}" +fi +if ${PW} groupshow "${GROUP}" 2>/dev/null 1>&2; then + ${ECHO} "To delete noip group permanently: ${PW} groupdel ${GROUP}" +fi +exit 0 diff --git a/dns/noip/pkg-descr b/dns/noip/pkg-descr new file mode 100644 index 000000000000..6e3b58983d27 --- /dev/null +++ b/dns/noip/pkg-descr @@ -0,0 +1,10 @@ +This is a port of No-IP.com's dynamic DNS update client. When +configured correctly, the client will check the local IP address at a +given time interval for any changes. If the local IP address has +changed it will notify the DNS servers at No-IP.com and update the IP +corresponding to your No-IP/No-IP+ hostname. + +WWW: http://www.No-IP.com/ + +- Eyal Soha +esoha@attbi.com diff --git a/dns/noip/pkg-install b/dns/noip/pkg-install new file mode 100644 index 000000000000..f4efdf4b8f46 --- /dev/null +++ b/dns/noip/pkg-install @@ -0,0 +1,32 @@ +#!/bin/sh + +if [ "$2" != "PRE-INSTALL" ]; then + exit 0 +fi + +PW=/usr/sbin/pw +ECHO=echo +USER=noip +GROUP=${USER} + +if ! ${PW} groupshow "${GROUP}" 2>/dev/null 1>&2; then + if ${PW} groupadd ${GROUP}; then + ${ECHO} "Added group \"${GROUP}\"." + else + ${ECHO} "Adding group \"${GROUP}\" failed..." + exit 1 + fi +fi + +if ! ${PW} usershow "${USER}" 2>/dev/null 1>&2; then + if ${PW} useradd ${USER} -g ${GROUP} -h - \ + -s "/sbin/nologin" -d "/nonexistent" \ + -c "noip_updater pseudo-user"; \ + then + ${ECHO} "Added user \"${USER}\"." + else + ${ECHO} "Adding user \"${USER}\" failed..." + exit 1 + fi +fi +exit 0 diff --git a/dns/noip/pkg-message b/dns/noip/pkg-message new file mode 100644 index 000000000000..a8fd115e237f --- /dev/null +++ b/dns/noip/pkg-message @@ -0,0 +1,14 @@ +################################################################## +You need to generate the noip config file 'no-ip.conf' in +%%PREFIX%%/etc/no-ip.conf. To do this automatically, run: + + make conf + +To do it manually, copy +%%PREFIX%%/share/examples/noip/no-ip.conf.sample to +%%PREFIX%%/etc/no-ip.conf and edit it or use +%%PREFIX%%/share/examples/noip/no-ip.sh to make no-ip.conf. Then +chown to noip:noip and chmod to 0600. + +You need to register with www.no-ip.com to use this port. +################################################################## diff --git a/dns/noip/pkg-plist b/dns/noip/pkg-plist new file mode 100644 index 000000000000..3ac22b4870f3 --- /dev/null +++ b/dns/noip/pkg-plist @@ -0,0 +1,8 @@ +bin/noip +etc/rc.d/noip.sh +%%PORTDOCS%%share/doc/noip/README.FIRST +%%PORTDOCS%%share/doc/noip/COPYING +%%PORTDOCS%%share/examples/noip/no-ip.conf.sample +%%PORTDOCS%%share/examples/noip/no-ip.sh +%%PORTDOCS%%@dirrm share/doc/noip +%%PORTDOCS%%@dirrm share/examples/noip diff --git a/net/Makefile b/net/Makefile index ebcd16467490..a01ce077e8a1 100644 --- a/net/Makefile +++ b/net/Makefile @@ -291,6 +291,7 @@ SUBDIR += ngrep-lib SUBDIR += nic SUBDIR += nocol + SUBDIR += noip SUBDIR += ns SUBDIR += nsc SUBDIR += nslint diff --git a/net/noip/Makefile b/net/noip/Makefile new file mode 100644 index 000000000000..96f654c96246 --- /dev/null +++ b/net/noip/Makefile @@ -0,0 +1,43 @@ +# New ports collection makefile for: No-IP Dynamic Update Client +# Date created: 28 March 2002 +# Whom: Eyal Soha +# +# $FreeBSD$ +# + +PORTNAME= noip +PORTVERSION= 1.6 +CATEGORIES= net +MASTER_SITES= http://www.no-ip.com/client/linux/ +DISTNAME= noip_updater_v${PORTVERSION} + +MAINTAINER= esoha@attbi.com + +ALL_TARGET= noip + +post-build: + ${SED} "s|%%PREFIX%%|${PREFIX}|g" < ${FILESDIR}/noip.sh > ${WRKSRC}/noip.sh + +pre-install: + @${SETENV} PKG_PREFIX=${PREFIX} ${SH} \ + ${PKGINSTALL} ${PKGNAME} PRE-INSTALL + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/noip ${PREFIX}/bin + ${INSTALL_SCRIPT} ${WRKSRC}/noip.sh ${PREFIX}/etc/rc.d +.if !defined(NOPORTDOCS) + ${MKDIR} ${PREFIX}/share/doc/${PORTNAME} + ${INSTALL_MAN} ${WRKSRC}/README.FIRST ${PREFIX}/share/doc/${PORTNAME} + ${INSTALL_MAN} ${WRKSRC}/COPYING ${PREFIX}/share/doc/${PORTNAME} + ${MKDIR} ${PREFIX}/share/examples/${PORTNAME} + ${INSTALL_MAN} ${WRKSRC}/no-ip.conf.sample ${PREFIX}/share/examples/${PORTNAME} + ${INSTALL_SCRIPT} ${WRKSRC}/no-ip.sh ${PREFIX}/share/examples/${PORTNAME} +.endif + @${SED} "s|%%PREFIX%%|${PREFIX}|g" ${PKGMESSAGE} | ${SED} "s|%%WRKSRC%%|${WRKSRC}|g" + +conf: + (cd ${PREFIX}/etc && ${PREFIX}/share/examples/noip/no-ip.sh) + ${CHOWN} noip:noip ${PREFIX}/etc/no-ip.conf + ${CHMOD} 0600 ${PREFIX}/etc/no-ip.conf + +.include diff --git a/net/noip/distinfo b/net/noip/distinfo new file mode 100644 index 000000000000..41d0c1e0f8ff --- /dev/null +++ b/net/noip/distinfo @@ -0,0 +1 @@ +MD5 (noip_updater_v1.6.tar.gz) = 6503e2e7d8ea35c304744a318b400a09 diff --git a/net/noip/files/noip.sh b/net/noip/files/noip.sh new file mode 100644 index 000000000000..eca1af8323b8 --- /dev/null +++ b/net/noip/files/noip.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +case "$1" in + start) + if [ -x %%PREFIX%%/bin/noip -a -f %%PREFIX%%/etc/no-ip.conf ]; then + echo -n ' noip'; + su -m noip -c '%%PREFIX%%/bin/noip' 2> /dev/null > /dev/null + fi + ;; + stop) + echo -n ' noip'; + killall noip + ;; + *) + echo "Usage: `basename $0` {start|stop}" >&2 + exit 1 + ;; +esac +exit 0 diff --git a/net/noip/files/patch-no-ip.sh b/net/noip/files/patch-no-ip.sh new file mode 100644 index 000000000000..4d083a0ec7b6 --- /dev/null +++ b/net/noip/files/patch-no-ip.sh @@ -0,0 +1,16 @@ +--- no-ip.sh.orig Wed Oct 10 16:35:12 2001 ++++ no-ip.sh Fri Mar 29 01:55:11 2002 +@@ -1,3 +1,4 @@ ++#!/bin/sh + # + # configuration file builder script for no-ip + # +@@ -89,7 +90,7 @@ + # + if [ "$NAT" = "N" ] + then +- devs=`tail +3 /proc/net/dev | awk -F: '{print $1}' | tr -d ' '|tr '\n' ' '` ++ devs=`ifconfig -l inet` + DEV=foo + while [ "$DEV" = "foo" ] + do diff --git a/net/noip/files/patch-noip.c b/net/noip/files/patch-noip.c new file mode 100644 index 000000000000..04b51cdfffd6 --- /dev/null +++ b/net/noip/files/patch-noip.c @@ -0,0 +1,12 @@ +--- noip.c.bak Sat Mar 30 17:59:58 2002 ++++ noip.c Sat Mar 30 17:59:15 2002 +@@ -452,7 +452,8 @@ + else + getip(IPaddress); + #ifdef DEBUG +- ErrMsg("! LIA = %s, IP = %s",Last_IP_Addr, IPaddress); ++ if (debug) ++ ErrMsg("! LIA = %s, IP = %s",Last_IP_Addr, IPaddress); + #endif + if ((*IPaddress != 0) && + (strcmp(IPaddress, Last_IP_Addr) != 0)) { diff --git a/net/noip/pkg-comment b/net/noip/pkg-comment new file mode 100644 index 000000000000..608172d2c32d --- /dev/null +++ b/net/noip/pkg-comment @@ -0,0 +1 @@ +No-IP.com's dynamic DNS update client diff --git a/net/noip/pkg-deinstall b/net/noip/pkg-deinstall new file mode 100644 index 000000000000..93a3036c7d43 --- /dev/null +++ b/net/noip/pkg-deinstall @@ -0,0 +1,21 @@ +#!/bin/sh + +if [ "$2" != "POST-DEINSTALL" ]; then + exit 0 +fi + +PW=/usr/sbin/pw +ECHO=echo +USER=noip +GROUP=${USER} + +if [ -f ${PKG_PREFIX}/etc/no-ip.conf ]; then + ${ECHO} "To delete noip configuration permanently: rm ${PKG_PREFIX}/etc/no-ip.conf" +fi +if ${PW} usershow "${USER}" 2>/dev/null 1>&2; then + ${ECHO} "To delete noip user permanently: ${PW} userdel ${USER}" +fi +if ${PW} groupshow "${GROUP}" 2>/dev/null 1>&2; then + ${ECHO} "To delete noip group permanently: ${PW} groupdel ${GROUP}" +fi +exit 0 diff --git a/net/noip/pkg-descr b/net/noip/pkg-descr new file mode 100644 index 000000000000..6e3b58983d27 --- /dev/null +++ b/net/noip/pkg-descr @@ -0,0 +1,10 @@ +This is a port of No-IP.com's dynamic DNS update client. When +configured correctly, the client will check the local IP address at a +given time interval for any changes. If the local IP address has +changed it will notify the DNS servers at No-IP.com and update the IP +corresponding to your No-IP/No-IP+ hostname. + +WWW: http://www.No-IP.com/ + +- Eyal Soha +esoha@attbi.com diff --git a/net/noip/pkg-install b/net/noip/pkg-install new file mode 100644 index 000000000000..f4efdf4b8f46 --- /dev/null +++ b/net/noip/pkg-install @@ -0,0 +1,32 @@ +#!/bin/sh + +if [ "$2" != "PRE-INSTALL" ]; then + exit 0 +fi + +PW=/usr/sbin/pw +ECHO=echo +USER=noip +GROUP=${USER} + +if ! ${PW} groupshow "${GROUP}" 2>/dev/null 1>&2; then + if ${PW} groupadd ${GROUP}; then + ${ECHO} "Added group \"${GROUP}\"." + else + ${ECHO} "Adding group \"${GROUP}\" failed..." + exit 1 + fi +fi + +if ! ${PW} usershow "${USER}" 2>/dev/null 1>&2; then + if ${PW} useradd ${USER} -g ${GROUP} -h - \ + -s "/sbin/nologin" -d "/nonexistent" \ + -c "noip_updater pseudo-user"; \ + then + ${ECHO} "Added user \"${USER}\"." + else + ${ECHO} "Adding user \"${USER}\" failed..." + exit 1 + fi +fi +exit 0 diff --git a/net/noip/pkg-message b/net/noip/pkg-message new file mode 100644 index 000000000000..a8fd115e237f --- /dev/null +++ b/net/noip/pkg-message @@ -0,0 +1,14 @@ +################################################################## +You need to generate the noip config file 'no-ip.conf' in +%%PREFIX%%/etc/no-ip.conf. To do this automatically, run: + + make conf + +To do it manually, copy +%%PREFIX%%/share/examples/noip/no-ip.conf.sample to +%%PREFIX%%/etc/no-ip.conf and edit it or use +%%PREFIX%%/share/examples/noip/no-ip.sh to make no-ip.conf. Then +chown to noip:noip and chmod to 0600. + +You need to register with www.no-ip.com to use this port. +################################################################## diff --git a/net/noip/pkg-plist b/net/noip/pkg-plist new file mode 100644 index 000000000000..3ac22b4870f3 --- /dev/null +++ b/net/noip/pkg-plist @@ -0,0 +1,8 @@ +bin/noip +etc/rc.d/noip.sh +%%PORTDOCS%%share/doc/noip/README.FIRST +%%PORTDOCS%%share/doc/noip/COPYING +%%PORTDOCS%%share/examples/noip/no-ip.conf.sample +%%PORTDOCS%%share/examples/noip/no-ip.sh +%%PORTDOCS%%@dirrm share/doc/noip +%%PORTDOCS%%@dirrm share/examples/noip