Ticket #33 (closed enhancement: fixed)

Opened 7 years ago

Last modified 6 years ago

use FAM to monitor /etc/avahi/services

Reported by: bugzillas@… Owned by: lennart
Milestone: Avahi 0.6.18 Component: avahi-daemon
Keywords: Cc:

Description

Having to manually signal the daemon when a new static service is added is inconvinient; it'd be nicer if you could just drop a file into the folder and have it work automatically

Change History

Changed 7 years ago by lennart

  • status changed from new to closed
  • resolution set to wontfix

This is unlikely to happen. Most editors aren't able to replace files atomically when you save them. Hence it is quite probable that half-written files produce parse errors when avahi reads them too early. Unfortunately there is no clean solution for this. Not all editors lock their files properly when saving them. (actually, most don't do it) The UNIX API doesn't offer any portable function for detecting if a file is still open for writing.

Sending a SIGHUP to the avahi-daemon isn't particulary cumbersome anyway, isn't it?

Changed 7 years ago by sebastien.estienne@…

maybe he is looking for something like samba does with smb.conf.

I know that you don't need to reload samba when you modify smb.conf, if the file is valid, it will automatically reload it

maybe it could be done for *.service, as they are xml file, it would be possible to fully validate them (correctness + DTD), and them use them, skipping invalide file.

Changed 7 years ago by lennart

Samba reads the config file each time a new SMB session is started, AFAIK. This translates badly to the stateless mDNS protocol.

Anyway, feel free to send in a patch. Though I don't think i will use it personally I'd certainly merge it.

Changed 6 years ago by lennart

  • resolution changed from wontfix to fixed

(In [1426]) Add inotify support for /ect/avahi/services and /etc/avahi/hosts. Based on a patch from "behanw". (Closes #95, #33)

Changed 6 years ago by lennart

  • milestone set to Avahi 0.6.18
Note: See TracTickets for help on using tickets.