confd: fix mDNS CNAME conflict by flipping the table

Instead of publishing A/AAAA records for $(hostname).loocal with a CNAME
infix.local, we flip it around to take advantage of the mDNS conflict
resolution rules.  This gives us infix.local for one device ont the LAN
and infix-2.local for the next.

Update all service records to *not* advertise hostname, but instead to
let Avahi imply that from the advertised A/AAAA and CNAME records.

Fixes #1387

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2026-03-09 19:24:36 +01:00
parent e2c29cb1a7
commit e255828418
4 changed files with 20 additions and 22 deletions
+5 -2
View File
@@ -1,2 +1,5 @@
service <!service/mdns/running> env:-/etc/default/mdns-alias log:prio:daemon.debug,tag:mdns \
[2345] mdns-alias $MDNS_ALIAS_ARGS -- mDNS alias advertiser
# Avahi advertises the system default hostname, this service advertises
# /etc/hostname (-H) and, optionally, network.local as CNAMEs. Changes
# to /etc/default/mdns-alias will cause Finit to restart not reload.
service <service/mdns/running> env:-/etc/default/mdns-alias \
[2345] mdns-alias -H $MDNS_ALIAS_ARGS --