summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Wegener <swegener@gentoo.org>2017-05-05 19:58:25 +0000
committerSven Wegener <swegener@gentoo.org>2017-05-05 20:23:40 +0000
commit042c1165eee51da026e09671a8fc86266de281bf (patch)
tree3f50e1ca40ca738879bba873c0e1fbc63d2e814a /net-dns/pdns
parentapp-admin/sysstat: fix from Chromium OS for unaligned memory errors (diff)
downloadgentoo-042c1165eee51da026e09671a8fc86266de281bf.tar.gz
gentoo-042c1165eee51da026e09671a8fc86266de281bf.tar.bz2
gentoo-042c1165eee51da026e09671a8fc86266de281bf.zip
net-dns/pdns: Remove non-compatible code from init script
Package-Manager: Portage-2.3.5, Repoman-2.3.2
Diffstat (limited to 'net-dns/pdns')
-rw-r--r--net-dns/pdns/files/pdns-r121
-rw-r--r--net-dns/pdns/pdns-4.0.3-r2.ebuild (renamed from net-dns/pdns/pdns-4.0.3-r1.ebuild)0
2 files changed, 17 insertions, 4 deletions
diff --git a/net-dns/pdns/files/pdns-r1 b/net-dns/pdns/files/pdns-r1
index 84ba1a141084..a7a8c1ebfb90 100644
--- a/net-dns/pdns/files/pdns-r1
+++ b/net-dns/pdns/files/pdns-r1
@@ -4,6 +4,7 @@
PDNS_CONFIGDIR="${PDNS_CONFIGDIR:-/etc/powerdns}"
PDNS_SOCKETDIR="${PDNS_SOCKETDIR:-/var/lib/powerdns}"
+PDNS_STOP_TIMEOUT="${PDNS_STOP_TIMEOUT:-10}"
name="PowerDNS Authoritative Server"
description="Authoritative name server"
@@ -45,12 +46,24 @@ status() {
stop() {
default_stop || return
_ping || return 0
+ wait_for_stop
+}
- local sleep
- for sleep in 0.1 0.2 0.3 0.4; do
- sleep "${sleep}"
- _ping || return 0
+wait_for_stop() {
+ einfon "Waiting for ${name} to stop"
+
+ local timeout="${PDNS_STOP_TIMEOUT}"
+ while [ "${timeout}" -gt 0 ]; do
+ sleep 1
+ if ! _ping; then
+ echo
+ return 0
+ fi
+ : $(( timeout -= 1 ))
+ echo -n .
done
+
+ echo
return 1
}
diff --git a/net-dns/pdns/pdns-4.0.3-r1.ebuild b/net-dns/pdns/pdns-4.0.3-r2.ebuild
index f68b555fb8d9..f68b555fb8d9 100644
--- a/net-dns/pdns/pdns-4.0.3-r1.ebuild
+++ b/net-dns/pdns/pdns-4.0.3-r2.ebuild