|
When dbus activation is working the After=avahi-daemon should not be
necessary. However, it appears that dbus activation is only correctly
configured when avahi-daemon is enabled as that's when the appropriate
symlink is created. It would fail with:
Activation via systemd failed for unit 'dbus-org.freedesktop.Avahi.service': Unit dbus-org.freedesktop.Avahi.service not found.
While Requires=avahi-daemon needs to be present for the same reason as
After=, pkgdistcache-daemon does not currently notice if avahi-daemon is
restarted. When Avahi restarts it forgets the previous publishes. So I
work around that by having pkgdistcached restart when avahi-daemon
restarts via Requires=. While I could make pkgdistcache-daemon notice
the restart, it doesn't gain us anything because of the dbus activation
issue.
|