configs: enable avahi-autoipd for use as ZeroConf agent

With the new templating support in Finit, and this patch, we can now
very easily enable a ZeroConf service on, e.g., eth0:

    $ initctl enable zeroconf@eth0

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2023-04-27 09:59:35 +02:00
committed by Tobias Waldekranz
parent 78c12d66fe
commit 85f67f6a0f
4 changed files with 9 additions and 2 deletions
+2
View File
@@ -1,3 +1,5 @@
# Allow users in wheel group to reboot and perform a factory reset
/sbin/initctl f 4750 root wheel - - - - -
/sbin/factory f 4750 root wheel - - - - -
/var/lib/avahi-autoipd d 0755 avahi avahi - - - - -
-1
View File
@@ -52,7 +52,6 @@ BR2_PACKAGE_NETOPEER2_CLI=y
BR2_PACKAGE_NSS_MDNS=y
BR2_PACKAGE_ONIGURUMA=y
BR2_PACKAGE_AVAHI=y
# BR2_PACKAGE_AVAHI_AUTOIPD is not set
BR2_PACKAGE_AVAHI_DAEMON=y
BR2_PACKAGE_AVAHI_DEFAULT_SERVICES=y
BR2_PACKAGE_CHRONY=y
-1
View File
@@ -49,7 +49,6 @@ BR2_PACKAGE_NETOPEER2_CLI=y
BR2_PACKAGE_NSS_MDNS=y
BR2_PACKAGE_ONIGURUMA=y
BR2_PACKAGE_AVAHI=y
# BR2_PACKAGE_AVAHI_AUTOIPD is not set
BR2_PACKAGE_AVAHI_DAEMON=y
BR2_PACKAGE_AVAHI_DEFAULT_SERVICES=y
BR2_PACKAGE_CHRONY=y
@@ -44,6 +44,13 @@ endef
SKELETON_INIT_FINIT_TARGET_FINALIZE_HOOKS += SKELETON_INIT_FINIT_SET_AVAHI
endif
ifeq ($(BR2_PACKAGE_AVAHI_AUTOIPD),y)
define SKELETON_INIT_FINIT_SET_AVAHI_AUTOIPD
echo "service [2345789] name:zeroconf :%i avahi-autoipd --syslog %i -- ZeroConf for %i" > $(FINIT_D)/available/zeroconf@.conf
endef
SKELETON_INIT_FINIT_TARGET_FINALIZE_HOOKS += SKELETON_INIT_FINIT_SET_AVAHI_AUTOIPD
endif
ifeq ($(BR2_PACKAGE_CHRONY),y)
define SKELETON_INIT_FINIT_SET_CHRONY
cp $(SKELETON_INIT_FINIT_AVAILABLE)/chronyd.conf $(FINIT_D)/available/