summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-dns/pdnsd/files/pdnsd.online')
-rw-r--r--net-dns/pdnsd/files/pdnsd.online17
1 files changed, 14 insertions, 3 deletions
diff --git a/net-dns/pdnsd/files/pdnsd.online b/net-dns/pdnsd/files/pdnsd.online
index b7bef321221a..8db7f6f25690 100644
--- a/net-dns/pdnsd/files/pdnsd.online
+++ b/net-dns/pdnsd/files/pdnsd.online
@@ -1,20 +1,31 @@
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-dns/pdnsd/files/pdnsd.online,v 1.4 2004/07/14 23:26:19 agriffis Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dns/pdnsd/files/pdnsd.online,v 1.5 2008/12/13 10:50:00 mrness Exp $
depend() {
need pdnsd net.${IFACE}
}
+wait_for_socket() {
+ local pdnsd_socket="/var/cache/pdnsd/pdnsd.status"
+ for ((i=0; i < 10; i=$i+1)) ; do
+ [ -S "${pdnsd_socket}" ] && return 0
+ sleep 1s
+ done
+ eerror "${pdnsd_socket} socket is missing."
+ return 1
+}
+
start() {
+ wait_for_socket || return 1
ebegin "Starting pdnsd-online"
- /usr/sbin/pdnsd-ctl server all up
+ /usr/sbin/pdnsd-ctl -q server all up
eend $?
}
stop() {
ebegin "Stopping pdnsd-online"
- /usr/sbin/pdnsd-ctl server all down
+ /usr/sbin/pdnsd-ctl -q server all down
eend $?
}