summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYixun Lan <dlan@gentoo.org>2014-01-28 09:23:06 +0000
committerYixun Lan <dlan@gentoo.org>2014-01-28 09:23:06 +0000
commit7161a84919f10d3500b6c772bcd6131a4a686ff4 (patch)
treed1e15611a15ec775f7d3ea08ec26f871105ee61e /net-dns/ez-ipupdate/files
parentStable for amd64 wrt bug #499102 (diff)
downloadhistorical-7161a84919f10d3500b6c772bcd6131a4a686ff4.tar.gz
historical-7161a84919f10d3500b6c772bcd6131a4a686ff4.tar.bz2
historical-7161a84919f10d3500b6c772bcd6131a4a686ff4.zip
support ipv6 address via -a option, bug #432764, thanks Andreas Steinmetz
Package-Manager: portage-2.2.8/cvs/Linux x86_64 Manifest-Sign-Key: 0xAABEFD55
Diffstat (limited to 'net-dns/ez-ipupdate/files')
-rw-r--r--net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-ipv6.diff41
-rw-r--r--net-dns/ez-ipupdate/files/ez-ipupdate.initd14
2 files changed, 49 insertions, 6 deletions
diff --git a/net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-ipv6.diff b/net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-ipv6.diff
new file mode 100644
index 000000000000..ec41647e066f
--- /dev/null
+++ b/net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-ipv6.diff
@@ -0,0 +1,41 @@
+diff --git a/ez-ipupdate.c b/ez-ipupdate.c
+index ff093a9..eea7624 100644
+--- a/ez-ipupdate.c
++++ b/ez-ipupdate.c
+@@ -849,6 +849,27 @@ int is_dotted_quad(char *addr)
+ return(1);
+ }
+
++int is_ip_addr(char *addr)
++{
++#if HAVE_ARPA_INET_H
++ char dst[16];
++
++ if(inet_pton(AF_INET,addr,dst) == 1)
++ {
++ return(1);
++ }
++
++ if(inet_pton(AF_INET6,addr,dst) == 1)
++ {
++ return(1);
++ }
++
++ return(0);
++#else
++ return is_dotted_quad(addr);
++#endif
++}
++
+ void parse_service(char *str)
+ {
+ int i;
+@@ -1859,7 +1880,7 @@ int DYNDNS_check_info(void)
+ chomp(host);
+ }
+
+- if(address != NULL && !is_dotted_quad(address))
++ if(address != NULL && !is_ip_addr(address))
+ {
+ fprintf(stderr, "the IP address \"%s\" is invalid\n", address);
+ return(-1);
diff --git a/net-dns/ez-ipupdate/files/ez-ipupdate.initd b/net-dns/ez-ipupdate/files/ez-ipupdate.initd
index f33b1ee044c1..760bbfb272c1 100644
--- a/net-dns/ez-ipupdate/files/ez-ipupdate.initd
+++ b/net-dns/ez-ipupdate/files/ez-ipupdate.initd
@@ -1,7 +1,7 @@
#!/sbin/runscript
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-dns/ez-ipupdate/files/ez-ipupdate.initd,v 1.4 2013/10/13 16:00:04 pacho Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dns/ez-ipupdate/files/ez-ipupdate.initd,v 1.5 2014/01/28 09:22:49 dlan Exp $
extra_commands="update"
@@ -35,9 +35,11 @@ start() {
return 1
fi
- if [ ! -d /var/run/ez-ipupdate ]; then
- mkdir -p /var/run/ez-ipupdate && chown ez-ipupd:ez-ipupd /var/run/ez-ipupdate
- fi
+ for dir in /var/run/ez-ipupdate /var/cache/ez-ipupdate; do
+ if [ ! -d ${dir} ]; then
+ mkdir -p /var/run/ez-ipupdate && chown ez-ipupd:ez-ipupd /var/run/ez-ipupdate
+ fi
+ done
for NAME in ${LIST}; do
local CONFIG="/etc/ez-ipupdate/${NAME}.conf"
@@ -45,7 +47,7 @@ start() {
local CACHEFILE="/var/cache/ez-ipupdate/${NAME}.cache"
ebegin "Starting ez-ipupdate (${NAME})"
start-stop-daemon -p "${PIDFILE}" --start --quiet --exec /usr/sbin/ez-ipupdate \
- --chuid ez-ipupd -- -c "${CONFIG}" -F "${PIDFILE}" -b "${CACHEFILE}"
+ --user ez-ipupd:ez-ipupd -- -c "${CONFIG}" -F "${PIDFILE}" -b "${CACHEFILE}"
eend $?
done
return 0 # do not fail