summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--package/avahi/avahi.mk9
-rw-r--r--package/avahi/avahi_sysusers.conf5
2 files changed, 14 insertions, 0 deletions
diff --git a/package/avahi/avahi.mk b/package/avahi/avahi.mk
index ef621620f0..baffe3cb69 100644
--- a/package/avahi/avahi.mk
+++ b/package/avahi/avahi.mk
@@ -190,6 +190,13 @@ endif
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
@@ -201,6 +208,8 @@ define AVAHI_INSTALL_INIT_SYSTEMD
$(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
diff --git a/package/avahi/avahi_sysusers.conf b/package/avahi/avahi_sysusers.conf
new file mode 100644
index 0000000000..463ce97cea
--- /dev/null
+++ b/package/avahi/avahi_sysusers.conf
@@ -0,0 +1,5 @@
+# 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"
OpenPOWER on IntegriCloud