From 9b1d39a1bf2c4b6e75e1de9c16c1bff24474df4c Mon Sep 17 00:00:00 2001 From: Eli Bosley <11823237+elibosley@users.noreply.github.com> Date: Thu, 11 Jun 2026 21:08:23 +0000 Subject: [PATCH] fix(avahi): recover stopped daemon even when bind list matches config Gate the allow-interfaces mismatch check only on the running restart path; recover a stopped daemon independently when interfaces are back. Co-authored-by: linear-code[bot] <222613912+linear-code[bot]@users.noreply.github.com> --- etc/rc.d/rc.avahidaemon | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/etc/rc.d/rc.avahidaemon b/etc/rc.d/rc.avahidaemon index 70cc82b9e..e57fc196e 100755 --- a/etc/rc.d/rc.avahidaemon +++ b/etc/rc.d/rc.avahidaemon @@ -120,11 +120,16 @@ avahid_reload(){ } avahid_update(){ - if check && [[ "$(this allow-interfaces)" != "$BIND" ]]; then - if avahid_running; then + if avahid_running; then + # only restart a running daemon when the computed bind list changed + if check && [[ "$(this allow-interfaces)" != "$BIND" ]]; then log "Updating $DAEMON..." avahid_restart # note we need restart here, not reload in order to update interfaces - else + fi + else + # recover daemon when interfaces are back, even if config already matches computed bind list + if check && [[ -n $BIND ]]; then + log "Recovering $DAEMON..." avahid_start # handle case where avahi-daemon exited because no suitable interfaces fi fi