[package] update avahi to included D-Bus support, libavahi-client library and avahi...
[openwrt/svn-archive/archive.git] / libs / avahi / files / avahi-daemon.init
index 20f0a2e064810ab95cf2e90f67bc49e295ca3771..b2ae4580e902115695bd54a81f2ff4f112510737 100644 (file)
@@ -1,25 +1,23 @@
-#!/bin/sh
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006 OpenWrt.org
+START=61
 
 BIN=avahi-daemon
 DEFAULT=/etc/default/$BIN
 OPTIONS="-D"
 RUN_D=/var/run/$BIN
-[ -f $DEFAULT ] && . $DEFAULT
 
-case $1 in
- start)
-  mkdir -p $RUN_D
-  $BIN $OPTIONS
-  ;;
- stop)
+start() {
+       [ -f $DEFAULT ] && . $DEFAULT
+       mkdir -p $RUN_D
+       $BIN $OPTIONS
+}
+
+stop() {
   $BIN -k
-  ;;
- reload)
+}
+
+reload() {
   $BIN -r
-  ;;
- *)
-  echo "usage: $0 (start|stop|reload)"
-  exit 1
-esac
+}
 
-exit $?