3

I want to use avahi on a system with a read-only rootfs where /etc is not writable.

I can start avahi-daemon with the -f option to specify a non-standard location for the avahi-daemon.conf file (default location is /etc/avahi/avahi-daemon.conf). However I can't find any way to specify a non-standard location for the service definitions (default location is /etc/avahi/services). Is there any option for this ?

2 Answers 2

0

It seems that Avahi does not provide any configuration option for searching for service definitions in a non-standard location (other than rebuilding with a custom --prefix, but that obviously has other implications). In case someone else needs this, these are the options I've found:

  • Symlink /etc/avahi/services to a different directory. For this to work, the avahi daemon must be started with the --no-chroot option; otherwise it will not be able to reach out of the chroot jail.
  • Bind mount a different directory on /etc/avahi/services. This does not require that --no-chroot is used.

Both options work fine.

-1

(Using a answer window as it has more formatting options)

Note that Avahi service definitions allow wildcards. This might be adequate to allow the same definition on multiple hosts, thus allowing read-only /etc:

<?xml version="1.0" standalone='no'?><!--*-nxml-*--> <!DOCTYPE service-group SYSTEM "avahi-service.dtd"> <service-group> <name replace-wildcards="yes">%h</name> <service> <type>_ssh._tcp</type> <port>22</port> </service> </service-group> 
1
  • How does this answer the question ? Commented Feb 11, 2015 at 17:03

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.