summaryrefslogtreecommitdiffstats
path: root/package/mdnsresponder/rc.mdnsresponder
diff options
context:
space:
mode:
authorUlf Samuelsson <ulf.samuelsson@atmel.com>2007-08-11 16:44:54 +0000
committerUlf Samuelsson <ulf.samuelsson@atmel.com>2007-08-11 16:44:54 +0000
commit28625ea369ebc99920b5a7f626d3fa6e68d1b028 (patch)
treecc1462b6da7580927b9e411225244391641b7694 /package/mdnsresponder/rc.mdnsresponder
parent34335d029597e5a561fdbc01f54e54b117160015 (diff)
downloadbuildroot-novena-28625ea369ebc99920b5a7f626d3fa6e68d1b028.tar.gz
buildroot-novena-28625ea369ebc99920b5a7f626d3fa6e68d1b028.zip
Add mdnsresponder package
Diffstat (limited to 'package/mdnsresponder/rc.mdnsresponder')
-rw-r--r--package/mdnsresponder/rc.mdnsresponder67
1 files changed, 67 insertions, 0 deletions
diff --git a/package/mdnsresponder/rc.mdnsresponder b/package/mdnsresponder/rc.mdnsresponder
new file mode 100644
index 000000000..1b08cf06e
--- /dev/null
+++ b/package/mdnsresponder/rc.mdnsresponder
@@ -0,0 +1,67 @@
+#!/bin/sh
+#
+# Starts mDNSResponderPosix and mdnsd
+#
+
+umask 077
+
+start() {
+ echo -n "Starting mdnsd: "
+ start-stop-daemon --start --quiet --pidfile /var/run/mdnsd.pid \
+ --exec /usr/sbin/mdnsd
+ if [ "$?" != "0" ] ; then
+ echo "FAIL"
+ return 1
+ fi
+ echo "OK"
+
+ echo -n "Starting mDNSResponderPosix: "
+ start-stop-daemon --start --quiet --pidfile /var/run/mDNSResponderPosix.pid \
+ --exec /usr/sbin/mDNSResponderPosix \
+ -- -b -f /etc/mDNSResponderPosix.conf -P /var/run/mDNSResponderPosix.pid
+ if [ "$?" != "0" ] ; then
+ echo "FAIL"
+ return 1
+ fi
+ echo "OK"
+}
+stop() {
+ echo -n "Stopping mDNSResponderPosix: "
+ start-stop-daemon --stop --quiet --pidfile /var/run/mDNSResponderPosix.pid
+ if [ "$?" != "0" ] ; then
+ echo "FAIL"
+ return 1
+ fi
+ echo "OK"
+
+ echo -n "Stopping mdnsd: "
+ start-stop-daemon --stop --quiet --pidfile /var/run/mdnsd.pid
+ if [ "$?" != "0" ] ; then
+ echo "FAIL"
+ return 1
+ fi
+ echo "OK"
+}
+
+restart() {
+ stop
+ start
+}
+
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart|reload)
+ restart
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart}"
+ exit 1
+esac
+
+exit $?
+