--- /etc/network/if-up.d/avahi-daemon.orig 2007-03-27 14:40:11.000000000 -0400 +++ /etc/network/if-up.d/avahi-daemon 2007-05-02 13:10:25.000000000 -0400 @@ -10,7 +10,7 @@ AVAHI_DAEMON_START=1 test -f /etc/default/avahi-daemon && . /etc/default/avahi-daemon -if [ "$AVAHI_DAEMON_START" != "1" ] || [ "$MODE" != "start" ] || ! /usr/sbin/avahi-daemon -c; then +if [ "$AVAHI_DAEMON_START" != "1" ] || [ "$MODE" != "start" ] ; then exit 0 fi @@ -25,7 +25,17 @@ OUT=`LC_ALL=C host -t soa local. 2>&1` if [ $? -eq 0 ] && echo "$OUT" | egrep -vq 'has no|not found'; then - if [ -x /etc/init.d/avahi-daemon ]; then + if [ ! -d ${DISABLE_TAG_DIR} ] ; then + mkdir -m 0755 -p ${DISABLE_TAG_DIR} + chown avahi:avahi ${DISABLE_TAG_DIR} + fi + touch ${DISABLE_TAG} + # Possible race: avahi-daemon is in the process of starting + # but hasn't completed to the point where avahi-daemon -c registers, + # but began starting before we could set DISABLE_TAG + # The sleep is a hack to fix this + sleep 2 + if [ -x /etc/init.d/avahi-daemon ] && /usr/sbin/avahi-daemon -c; then /etc/init.d/avahi-daemon stop || true if [ -x /usr/bin/logger ]; then logger -p daemon.warning -t avahi <