avahi-dnsconfd.action(8)

πŸ’– avahi-dnsconfd.action(8) πŸ’–

okay bestie, gather round, because today we're talking about avahi-dnsconfd.action from the System Manager's Manual β€” yes it's a section 8 page, yes it's a script, yes it's lowkey iconic 🫢


✨ NAME ✨

avahi-dnsconfd.action β€” the action script for avahi-dnsconfd, no cap πŸ’…


✨ SYNOPSIS ✨

/etc/avahi/avahi-dnsconfd.action

that's it. that's the whole vibe. one path, zero flags, main character energy πŸ‘‘


✨ DESCRIPTION ✨

so avahi-dnsconfd.action is the action script that gets called every single time a new unicast DNS server is found β€” or removed β€” by avahi-dnsconfd. like, it literally gets summoned the moment things change πŸ¦‹

and the default script that ships with avahi? it patches /etc/resolv.conf so that file reflects the changed unicast DNS server configuration. it's giving "keeping everything in sync, periodt" ✨


✨ PARAMETERS ✨

here's the tea, bestie β€” the script gets arguments, and you cannot sleep on them:

  • argv[1] β€” holds the character "+" if the DNS server is new, and "-" when it's supposed to be removed from the DNS server list. so basically plus = hi bestie, minus = bye bestie 😭
  • argv[2] β€” the IP address of the DNS server 🌈
  • argv[3] β€” the numerical network interface number that this DNS server was found on πŸ”’
  • argv[4] β€” the numerical protocol number this DNS server was found on (usually 2 for IPv4 and 10 for IPv6, iykyk) 🌸

✨ ENVIRONMENT ✨

the environment variables are where it gets really cute:

  • AVAHI_INTERFACE β€” contains the textual interface name that corresponds with argv[3]. (e.g. "eth0") πŸŽ€
  • AVAHI_INTERFACE_DNS_SERVERS β€” contains a list of all DNS servers that avahi-dnsconfd found on the interface $AVAHI_INTERFACE, separated by spaces πŸ’–
  • AVAHI_DNS_SERVERS β€” contains a list of all DNS servers that avahi-dnsconfd found on all interfaces, separated by spaces 🌟

✨ AUTHORS ✨

The Avahi Developers <avahi (at) lists (dot) freedesktop (dot) org>; Avahi is available from http://avahi.org/ β€” shoutout to the devs, they ate πŸ’…πŸ‘‘


✨ SEE ALSO ✨

go read these too, they're part of the lore:


✨ COMMENTS ✨

fun fact fr fr: this man page was written using xml2man(1) by Oliver Kurth 🧚


bestie reminder: this page lives in the Manuals source, User section, and it's the avahi-dnsconfd.action(8) page you just read πŸ’œ now go patch that resolv.conf and slay πŸ’…βœ¨