add noip 1.6

No-IP.com's dynamic DNS update client

PR:		36543
Submitted by:	Eyal Soha <esoha@attbi.com>
This commit is contained in:
Ying-Chieh Liao 2002-06-25 09:32:29 +00:00
parent dd943e7784
commit 4742a297e4
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=61931
23 changed files with 355 additions and 0 deletions

43
dns/noip/Makefile Normal file
View file

@ -0,0 +1,43 @@
# New ports collection makefile for: No-IP Dynamic Update Client
# Date created: 28 March 2002
# Whom: Eyal Soha <esoha@attbi.com>
#
# $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 <bsd.port.mk>

1
dns/noip/distinfo Normal file
View file

@ -0,0 +1 @@
MD5 (noip_updater_v1.6.tar.gz) = 6503e2e7d8ea35c304744a318b400a09

19
dns/noip/files/noip.sh Normal file
View file

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

View file

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

View file

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

1
dns/noip/pkg-comment Normal file
View file

@ -0,0 +1 @@
No-IP.com's dynamic DNS update client

21
dns/noip/pkg-deinstall Normal file
View file

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

10
dns/noip/pkg-descr Normal file
View file

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

32
dns/noip/pkg-install Normal file
View file

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

14
dns/noip/pkg-message Normal file
View file

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

8
dns/noip/pkg-plist Normal file
View file

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

View file

@ -291,6 +291,7 @@
SUBDIR += ngrep-lib
SUBDIR += nic
SUBDIR += nocol
SUBDIR += noip
SUBDIR += ns
SUBDIR += nsc
SUBDIR += nslint

43
net/noip/Makefile Normal file
View file

@ -0,0 +1,43 @@
# New ports collection makefile for: No-IP Dynamic Update Client
# Date created: 28 March 2002
# Whom: Eyal Soha <esoha@attbi.com>
#
# $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 <bsd.port.mk>

1
net/noip/distinfo Normal file
View file

@ -0,0 +1 @@
MD5 (noip_updater_v1.6.tar.gz) = 6503e2e7d8ea35c304744a318b400a09

19
net/noip/files/noip.sh Normal file
View file

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

View file

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

View file

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

1
net/noip/pkg-comment Normal file
View file

@ -0,0 +1 @@
No-IP.com's dynamic DNS update client

21
net/noip/pkg-deinstall Normal file
View file

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

10
net/noip/pkg-descr Normal file
View file

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

32
net/noip/pkg-install Normal file
View file

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

14
net/noip/pkg-message Normal file
View file

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

8
net/noip/pkg-plist Normal file
View file

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