Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Is it possible that a single machine running avahi advertises other machines sharing files over afp ?

I have different machines running Gentoo but I don't want to run avahi on each server.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

I've found the solution by trying to tune .config files !

/etc/avahi/services/ contains *.services like afpd.services

  • Copy the afpd.servicies to match each machine you want to advertise : server1.service, server2.service, ...

  • Add the <host-name></host-name> tag in each .service

*.service :

<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<!-- Customize this to get a different name for your server in the Finder. -->
<name replace-wildcards="yes">MyHostname</name>
<service>
<type>_device-info._tcp</type>
<host-name>myhostname.mydomain.com</host-name>
<port>0</port>
<!-- Customize this to get a different icon in the Finder. -->
<txt-record>model=RackMac</txt-record>
</service>
<service>
<type>_afpovertcp._tcp</type>
<host-name>myhostname.mydomain.com</host-name>
<port>548</port>
</service>
</service-group>

Restart: /etc/init.d/avahi restart

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.