From: | "Aaron Swenson (titanofold)" <titanofold@g.o> |
---|---|
To: | gentoo-commits@l.g.o |
Subject: | [gentoo-commits] gentoo-x86 commit in net-dns/ddclient/files: ddclient.confd-r1 cmd-over-cfg.patch ddclient.initd-r3 |
Date: | Sun, 13 Nov 2011 16:42:12 |
Message-Id: | 20111113164202.534F52004B@flycatcher.gentoo.org |
1 | titanofold 11/11/13 16:42:02 |
2 | |
3 | Added: ddclient.confd-r1 cmd-over-cfg.patch |
4 | ddclient.initd-r3 |
5 | Log: |
6 | Fixes bug 386161. Initscript now creates (/var)?/run/ddclient folder for those on tmpfs. |
7 | |
8 | (Portage version: 2.1.10.11/cvs/Linux i686) |
9 | |
10 | Revision Changes Path |
11 | 1.1 net-dns/ddclient/files/ddclient.confd-r1 |
12 | |
13 | file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/ddclient/files/ddclient.confd-r1?rev=1.1&view=markup |
14 | plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/ddclient/files/ddclient.confd-r1?rev=1.1&content-type=text/plain |
15 | |
16 | Index: ddclient.confd-r1 |
17 | =================================================================== |
18 | # No need to specify a pid in /etc/ddclient/ddclient.conf |
19 | #PIDFILE=/var/run/ddclient/ddclient.pid |
20 | |
21 | |
22 | |
23 | 1.1 net-dns/ddclient/files/cmd-over-cfg.patch |
24 | |
25 | file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/ddclient/files/cmd-over-cfg.patch?rev=1.1&view=markup |
26 | plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/ddclient/files/cmd-over-cfg.patch?rev=1.1&content-type=text/plain |
27 | |
28 | Index: cmd-over-cfg.patch |
29 | =================================================================== |
30 | --- ddclient.old 2011-11-13 10:14:59.957846596 -0500 |
31 | +++ ddclient 2011-11-13 10:18:33.864245944 -0500 |
32 | @@ -773,7 +773,7 @@ |
33 | foreach my $h (sort keys %config) { |
34 | next if $config{$h}{'protocol'} ne lc($s); |
35 | $examined{$h} = 1; |
36 | - my $use = $config{$h}{'use'} || opt('use'); |
37 | + my $use = opt('use') || $config{$h}{'use'}; |
38 | local $opt{$use} = $config{$h}{$use} if $config{$h}{$use}; |
39 | # bug #13: we should only do this once |
40 | # use isn't enough, we have to save the origin to. |
41 | |
42 | |
43 | |
44 | 1.1 net-dns/ddclient/files/ddclient.initd-r3 |
45 | |
46 | file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/ddclient/files/ddclient.initd-r3?rev=1.1&view=markup |
47 | plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/ddclient/files/ddclient.initd-r3?rev=1.1&content-type=text/plain |
48 | |
49 | Index: ddclient.initd-r3 |
50 | =================================================================== |
51 | #!/sbin/runscript |
52 | # Copyright 1999-2011 Gentoo Foundation |
53 | # Distributed under the terms of the GNU General Public License v2 |
54 | # $Header: /var/cvsroot/gentoo-x86/net-dns/ddclient/files/ddclient.initd-r3,v 1.1 2011/11/13 16:42:02 titanofold Exp $ |
55 | |
56 | if [ -d /run ] ; then |
57 | PIDFILE=${PIDFILE:-/run/ddclient/ddclient.pid} |
58 | else |
59 | PIDFILE=${PIDFILE:-/var/run/ddclient/ddclient.pid} |
60 | fi |
61 | |
62 | depend() { |
63 | before cron |
64 | need net |
65 | use dns logger squid |
66 | } |
67 | |
68 | checkconfig() { |
69 | local conf="/etc/ddclient/ddclient.conf" |
70 | |
71 | if [ -e "${conf}" ] ; then |
72 | if [ -n "$(find /etc/ddclient -maxdepth 1 -name ddclient.conf -perm +0044)" ] ; then |
73 | eerror "${conf} must not be world or group readable. Try:" |
74 | eerror " chmod 600 ${conf}" |
75 | eerror " chown ddclient:ddclient ${conf}" |
76 | return 1 |
77 | fi |
78 | else |
79 | eerror "${conf} is needed to run ddclient" |
80 | eerror "There is a sample file in /etc/ddclient/" |
81 | return 1 |
82 | fi |
83 | } |
84 | |
85 | start() { |
86 | checkconfig || return 1 |
87 | |
88 | local piddir=$(dirname ${PIDFILE}) |
89 | if [ ! -d ${piddir} ] ; then |
90 | ebegin "Making ${piddir}" |
91 | mkdir -p ${piddir} |
92 | eend $? |
93 | ebegin "Changing permissions of ${piddir}" |
94 | chown ddclient:ddclient ${piddir} |
95 | eend $? |
96 | fi |
97 | |
98 | ebegin "Starting ${SVCNAME}" |
99 | start-stop-daemon --start --user ddclient --exec /usr/sbin/ddclient \ |
100 | --name ddclient --pidfile ${PIDFILE} -- -pid=${PIDFILE} |
101 | eend $? |
102 | } |
103 | |
104 | stop() { |
105 | ebegin "Stopping ${SVCNAME}" |
106 | start-stop-daemon --stop --signal USR1 --pidfile ${PIDFILE} |
107 | eend $? |
108 | } |