ifeq ($(BR2_PACKAGE_AVAHI_DAEMON),y)
+ifeq ($(BR2_PACKAGE_SYSTEMD_SYSUSERS),y)
+define AVAHI_INSTALL_SYSTEMD_SYSUSERS
+ $(INSTALL) -D -m 644 package/avahi/avahi_sysusers.conf \
+ $(TARGET_DIR)/usr/lib/sysusers.d/avahi.conf
+endef
+endif
+
define AVAHI_INSTALL_INIT_SYSTEMD
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
$(INSTALL) -D -m 644 package/avahi/avahi_tmpfiles.conf \
$(TARGET_DIR)/usr/lib/tmpfiles.d/avahi.conf
+
+ $(AVAHI_INSTALL_SYSTEMD_SYSUSERS)
endef
define AVAHI_INSTALL_DAEMON_INIT_SYSV
--- /dev/null
+# sysusers.d snippet for creating the avahi system user automatically
+# at boot on systemd-based systems that ship with an unpopulated
+# /etc. See sysusers.d(5) for details.
+
+u avahi - "Avahi mDNS/DNS-SD Stack"