Gentoo Archives: gentoo-commits

From: "Yixun Lan (dlan)" <dlan@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-dns/ez-ipupdate/files: ez-ipupdate-3.0.11.13.3_beta8-ipv6.diff ez-ipupdate.initd
Date: Tue, 28 Jan 2014 09:22:52
Message-Id: 20140128092249.E32DF2004C@flycatcher.gentoo.org
1 dlan 14/01/28 09:22:49
2
3 Modified: ez-ipupdate.initd
4 Added: ez-ipupdate-3.0.11.13.3_beta8-ipv6.diff
5 Log:
6 support ipv6 address via -a option, bug #432764, thanks Andreas Steinmetz
7
8 (Portage version: 2.2.8/cvs/Linux x86_64, signed Manifest commit with key 0xAABEFD55)
9
10 Revision Changes Path
11 1.5 net-dns/ez-ipupdate/files/ez-ipupdate.initd
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/ez-ipupdate/files/ez-ipupdate.initd?rev=1.5&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/ez-ipupdate/files/ez-ipupdate.initd?rev=1.5&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/ez-ipupdate/files/ez-ipupdate.initd?r1=1.4&r2=1.5
16
17 Index: ez-ipupdate.initd
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/net-dns/ez-ipupdate/files/ez-ipupdate.initd,v
20 retrieving revision 1.4
21 retrieving revision 1.5
22 diff -u -r1.4 -r1.5
23 --- ez-ipupdate.initd 13 Oct 2013 16:00:04 -0000 1.4
24 +++ ez-ipupdate.initd 28 Jan 2014 09:22:49 -0000 1.5
25 @@ -1,7 +1,7 @@
26 #!/sbin/runscript
27 -# Copyright 1999-2013 Gentoo Foundation
28 +# Copyright 1999-2014 Gentoo Foundation
29 # Distributed under the terms of the GNU General Public License v2
30 -# $Header: /var/cvsroot/gentoo-x86/net-dns/ez-ipupdate/files/ez-ipupdate.initd,v 1.4 2013/10/13 16:00:04 pacho Exp $
31 +# $Header: /var/cvsroot/gentoo-x86/net-dns/ez-ipupdate/files/ez-ipupdate.initd,v 1.5 2014/01/28 09:22:49 dlan Exp $
32
33 extra_commands="update"
34
35 @@ -35,9 +35,11 @@
36 return 1
37 fi
38
39 - if [ ! -d /var/run/ez-ipupdate ]; then
40 - mkdir -p /var/run/ez-ipupdate && chown ez-ipupd:ez-ipupd /var/run/ez-ipupdate
41 - fi
42 + for dir in /var/run/ez-ipupdate /var/cache/ez-ipupdate; do
43 + if [ ! -d ${dir} ]; then
44 + mkdir -p /var/run/ez-ipupdate && chown ez-ipupd:ez-ipupd /var/run/ez-ipupdate
45 + fi
46 + done
47
48 for NAME in ${LIST}; do
49 local CONFIG="/etc/ez-ipupdate/${NAME}.conf"
50 @@ -45,7 +47,7 @@
51 local CACHEFILE="/var/cache/ez-ipupdate/${NAME}.cache"
52 ebegin "Starting ez-ipupdate (${NAME})"
53 start-stop-daemon -p "${PIDFILE}" --start --quiet --exec /usr/sbin/ez-ipupdate \
54 - --chuid ez-ipupd -- -c "${CONFIG}" -F "${PIDFILE}" -b "${CACHEFILE}"
55 + --user ez-ipupd:ez-ipupd -- -c "${CONFIG}" -F "${PIDFILE}" -b "${CACHEFILE}"
56 eend $?
57 done
58 return 0 # do not fail
59
60
61
62 1.1 net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-ipv6.diff
63
64 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-ipv6.diff?rev=1.1&view=markup
65 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-ipv6.diff?rev=1.1&content-type=text/plain
66
67 Index: ez-ipupdate-3.0.11.13.3_beta8-ipv6.diff
68 ===================================================================
69 diff --git a/ez-ipupdate.c b/ez-ipupdate.c
70 index ff093a9..eea7624 100644
71 --- a/ez-ipupdate.c
72 +++ b/ez-ipupdate.c
73 @@ -849,6 +849,27 @@ int is_dotted_quad(char *addr)
74 return(1);
75 }
76
77 +int is_ip_addr(char *addr)
78 +{
79 +#if HAVE_ARPA_INET_H
80 + char dst[16];
81 +
82 + if(inet_pton(AF_INET,addr,dst) == 1)
83 + {
84 + return(1);
85 + }
86 +
87 + if(inet_pton(AF_INET6,addr,dst) == 1)
88 + {
89 + return(1);
90 + }
91 +
92 + return(0);
93 +#else
94 + return is_dotted_quad(addr);
95 +#endif
96 +}
97 +
98 void parse_service(char *str)
99 {
100 int i;
101 @@ -1859,7 +1880,7 @@ int DYNDNS_check_info(void)
102 chomp(host);
103 }
104
105 - if(address != NULL && !is_dotted_quad(address))
106 + if(address != NULL && !is_ip_addr(address))
107 {
108 fprintf(stderr, "the IP address \"%s\" is invalid\n", address);
109 return(-1);