[Pkg-utopia-maintainers] Bug#847456: fixed in avahi 0.7-2

Martin Erik Werner martinerikwerner at gmail.com
Fri Sep 22 20:52:01 UTC 2017


diff --git a/debian/avahi-daemon-check-dns.sh b/debian/avahi-daemon-check-dns.sh
index 8f7893b..7f92e9d 100755
--- a/debian/avahi-daemon-check-dns.sh
+++ b/debian/avahi-daemon-check-dns.sh
(...)
@@ -114,22 +125,12 @@ enable_avahi () {
 disable_avahi () {
   [ -e ${DISABLE_TAG} ] && return
 
-  if [ -x /etc/init.d/avahi-daemon ]; then
-    if [ -x "$(which invoke-rc.d 2>/dev/null)" ]; then
-      invoke-rc.d --force avahi-daemon stop || true
-    else
-      /etc/init.d/avahi-daemon stop || true
-    fi
-    if [ -x /usr/bin/logger ]; then
-      logger -p daemon.warning -t avahi <<EOF
-Avahi detected that your currently configured local DNS server serves
-a domain .local. This is inherently incompatible with Avahi and thus
-Avahi disabled itself. If you want to use Avahi in this network, please
-contact your administrator and convince him to use a different DNS domain,
-since .local should be used exclusively for Zeroconf technology.
-For more information, see http://avahi.org/wiki/AvahiAndUnicastDotLocal
-EOF
-    fi
+  if [ -d /run/systemd/system ]; then
+    systemctl stop avahi-daemon.socket avahi-daemon.service || true
+    log_disable_warning
+  elif [ -x "/etc/init.d/avahi-daemon" ]; then
+    /etc/init.d/avahi-daemon stop || true
+    log_disable_warning
   fi
   ensure_rundir
   touch ${DISABLE_TAG}


Using stop on avahi-daemon does not work to stop it on my Debian
stretch machine, since dbus restarts is automatically:
(...) dbus[###]: [system] Activating via systemd: service
name='org.freedesktop.Avahi' unit='dbus-org.freedesktop.Avahi.service'

Using 'disable' in addition to 'stop' appears to be needed to stop
avahi from being instantly revived by dbus, unless this has changed in
Buster?

(Also worth noting is that 'mask' is needed for the disabling to
survive a reboot, so in practice stop is noop, disable is stop and mask
is disable for avahi, which is quite odd...)

-- 
Martin Erik Werner <martinerikwerner at gmail.com>



More information about the Pkg-utopia-maintainers mailing list