Added service file and package generation
This commit is contained in:
32
etc/init.d/S80mdnsd
Executable file
32
etc/init.d/S80mdnsd
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
# Wait for network to come up...
|
||||
(
|
||||
while [ ! -f /tmp/if-up ]; do
|
||||
echo "mdnsd: waiting for network..."
|
||||
sleep 1
|
||||
done
|
||||
|
||||
interface="`/sbin/route | /bin/sed -n '$ {
|
||||
s/.* //
|
||||
p
|
||||
}'`"
|
||||
echo " MDNS interface: [$interface]"
|
||||
[ -z "$interface" ] && interface=eth0
|
||||
|
||||
/bin/ip route add 224.0.0.0/4 dev $interface
|
||||
/mod/sbin/mdnsd &
|
||||
) &
|
||||
;;
|
||||
stop)
|
||||
killall -q mdnsd
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user