avahi settings (servername) - how to change?

Status
Not open for further replies.

ObiTobi

Patron
Joined
Jul 12, 2013
Messages
316
Hi,

I wish you happy new year

I updated my box from 9.1 to 9.2 release and there is a thing I would like change.
If I do nothing, then I see in finder on my Mac
Bildschirmfoto 2014-01-01 um 13.20.35.png


On 9.1 release I changed part of the /etc/rc.d/ix-afpd file

generate_avahi_afpd_service()
{
local srv_name

if srv_enabled afp; then
cat > "$avahi_afpd_service" <<EOF
<?xml version="1.0" standalone="no"?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">mynas001.domain.de</name> <- from %h
<service>
<type>_afpovertcp._tcp</type>
<port>548</port>
</service>
<service>
<type>_device-info._tcp</type>
<port>0</port>
<txt-record>model=Xserve</txt-record> <- from (I'm not sure) I think RackMac
</service>
</service-group>
EOF

After these changes, the FQDN the server was displayed

Now is the avahi settings file generated from
/conf/base/etc/ix.rc.d/ix-avahi

If I change
cat > "$multi_service" <<EOF
<?xml version="1.0" standalone="no"?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h</name> <- to mynas001.domain.de

then I see in finder 2 Server entries
mynas001
mynas001.domain.de

I think it must be somewhere something changed so I can see only FQDN of the server,, but I have no idea where.

Cheers
 
D

dlavigne

Guest
I think it must be somewhere something changed so I can see only FQDN of the server,, but I have no idea where.

From http://doc.freenas.org/index.php/What's_New_in_9.2.0:
This is also related to:
  • Avahi, also known as multicast DNS or Bonjour, is now used to register all services, including the web service. This means that you no longer need to have a monitor attached to the system to know its initial IP address, if the system your browser is running on supports mDNS. freenas.local is the default hostname, unless their are multiple FreeNAS® systems in the network, in which case the default hostname is freenas-n.local, where n is the number of that system. It also means that only one server now appears to Mac OS X Finder. If the system has AFP shares, Finder will not display any CIFS shares. This is different from 9.1 which showed one server per protocol in Finder.
 

ObiTobi

Patron
Joined
Jul 12, 2013
Messages
316
I have set the Hostname field as FQDN but Finder shows only short Hostname
 
J

jpaetzel

Guest
You're seeing two entries due to caching or reloading of avahi. Or maybe both!

If you service avahi-daemon restart on the FreeNAS CLI and then reboot the Mac you'll see only one entry.

If you want to make permanant changes to the config file generator make sure to mountrw / and change the file in /conf/base/etc. /etc is a memory filesystem that is populated at boot.

As far as the change itself, I don't see a way of exposing this to the user without making FreeNAS more complicated. And it's complicated enough already. The vast majority of users seem to be fine with the current status quo.

You may create a feature request for this at bugs.freenas.org if you feel strongly about it. It will get reviewed by the entire team before it's fate is decided!
 

ObiTobi

Patron
Joined
Jul 12, 2013
Messages
316
I'm not sure if you understand what I mean.
I want to see in the Finder, of course, only one server entry but as a FQDN and not as Short Name.
 
Status
Not open for further replies.
Top