summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-misc/mDNSResponder/files/mdnsd.init.d')
-rw-r--r--net-misc/mDNSResponder/files/mdnsd.init.d38
1 files changed, 27 insertions, 11 deletions
diff --git a/net-misc/mDNSResponder/files/mdnsd.init.d b/net-misc/mDNSResponder/files/mdnsd.init.d
index 6e726e31cfb5..44a8a682c900 100644
--- a/net-misc/mDNSResponder/files/mdnsd.init.d
+++ b/net-misc/mDNSResponder/files/mdnsd.init.d
@@ -1,20 +1,36 @@
#!/sbin/runscript
-# Copyright 1999-2004 Gentoo Foundation
+# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/mDNSResponder/files/mdnsd.init.d,v 1.1 2005/02/23 21:41:22 motaboy Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/mDNSResponder/files/mdnsd.init.d,v 1.2 2005/08/27 16:46:45 greg_g Exp $
+
+opts="${opts} reload dump"
+
+depend() {
+ after net
+}
start() {
- ebegin "Starting mdnsd"
- start-stop-daemon --start --quiet --pidfile /var/run/mdnsd.pid \
- --startas /usr/sbin/mdnsd
- eend $? "Failed to start mdnsd"
+ ebegin "Starting mdnsd"
+ start-stop-daemon --start --quiet --pidfile /var/run/mdnsd.pid \
+ --exec /usr/sbin/mdnsd
+
+ eend $? "Failed to start mdnsd"
}
stop() {
- ebegin "Stopping mdnsd"
- start-stop-daemon --stop --quiet --pidfile /var/run/mdnsd.pid
- eend $? "Failed to stop mdnsd"
+ ebegin "Stopping mdnsd"
+ start-stop-daemon --stop --quiet --pidfile /var/run/mdnsd.pid
+ eend $? "Failed to stop mdnsd"
+}
+
+reload() {
+ ebegin "Reloading mdnsd"
+ kill -HUP `cat /var/run/mdnsd.pid` >&/dev/null
+ eend $? "Failed to reload mdnsd"
+}
- # clean stale pidfile
- [ -f /var/run/mdnsd.pid ] && rm -f /var/run/mdnsd.pid
+dump() {
+ ebegin "Dump mdnsd state to logs"
+ kill -USR1 `cat /var/run/mdnsd.pid` >&/dev/null
+ eend $? "Failed to dump mdnsd state"
}