Files
zeroconf/etc/init.d/S80mdnsd

33 lines
466 B
Bash
Executable File

#!/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