1 |
commit: 042c1165eee51da026e09671a8fc86266de281bf |
2 |
Author: Sven Wegener <swegener <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri May 5 19:58:25 2017 +0000 |
4 |
Commit: Sven Wegener <swegener <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri May 5 20:23:40 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=042c1165 |
7 |
|
8 |
net-dns/pdns: Remove non-compatible code from init script |
9 |
|
10 |
Package-Manager: Portage-2.3.5, Repoman-2.3.2 |
11 |
|
12 |
net-dns/pdns/files/pdns-r1 | 21 +++++++++++++++++---- |
13 |
.../{pdns-4.0.3-r1.ebuild => pdns-4.0.3-r2.ebuild} | 0 |
14 |
2 files changed, 17 insertions(+), 4 deletions(-) |
15 |
|
16 |
diff --git a/net-dns/pdns/files/pdns-r1 b/net-dns/pdns/files/pdns-r1 |
17 |
index 84ba1a14108..a7a8c1ebfb9 100644 |
18 |
--- a/net-dns/pdns/files/pdns-r1 |
19 |
+++ b/net-dns/pdns/files/pdns-r1 |
20 |
@@ -4,6 +4,7 @@ |
21 |
|
22 |
PDNS_CONFIGDIR="${PDNS_CONFIGDIR:-/etc/powerdns}" |
23 |
PDNS_SOCKETDIR="${PDNS_SOCKETDIR:-/var/lib/powerdns}" |
24 |
+PDNS_STOP_TIMEOUT="${PDNS_STOP_TIMEOUT:-10}" |
25 |
|
26 |
name="PowerDNS Authoritative Server" |
27 |
description="Authoritative name server" |
28 |
@@ -45,12 +46,24 @@ status() { |
29 |
stop() { |
30 |
default_stop || return |
31 |
_ping || return 0 |
32 |
+ wait_for_stop |
33 |
+} |
34 |
|
35 |
- local sleep |
36 |
- for sleep in 0.1 0.2 0.3 0.4; do |
37 |
- sleep "${sleep}" |
38 |
- _ping || return 0 |
39 |
+wait_for_stop() { |
40 |
+ einfon "Waiting for ${name} to stop" |
41 |
+ |
42 |
+ local timeout="${PDNS_STOP_TIMEOUT}" |
43 |
+ while [ "${timeout}" -gt 0 ]; do |
44 |
+ sleep 1 |
45 |
+ if ! _ping; then |
46 |
+ echo |
47 |
+ return 0 |
48 |
+ fi |
49 |
+ : $(( timeout -= 1 )) |
50 |
+ echo -n . |
51 |
done |
52 |
+ |
53 |
+ echo |
54 |
return 1 |
55 |
} |
56 |
|
57 |
|
58 |
diff --git a/net-dns/pdns/pdns-4.0.3-r1.ebuild b/net-dns/pdns/pdns-4.0.3-r2.ebuild |
59 |
similarity index 100% |
60 |
rename from net-dns/pdns/pdns-4.0.3-r1.ebuild |
61 |
rename to net-dns/pdns/pdns-4.0.3-r2.ebuild |