9.2.1.8 - How to add global options to afp.conf?

Status
Not open for further replies.

kjp4756

Contributor
Joined
Feb 11, 2014
Messages
102
I need to disable zeroconf on afp. How can I do this on FreeNAS 9.2.1.8? On 9.3 there is a way to add global options.

I've tried editing /conf/base/etc/local/afp.conf but that didn't do much. I also see a /conf/base/etc/local/afp.conf.dist. Is that the file I should edit?

Thanks.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Editing files isn't going to go well because the OS creates the files per the config and such. So anything you try to do yourself is going to get overwritten by the OS at some point.

Unfortunately the only good answer I have for you is wait for 9.3. :/
 

kjp4756

Contributor
Joined
Feb 11, 2014
Messages
102
I figured it out. This will work for for me until 9.3 is out.

The file I had to edit was /usr/local/www/nas/generate_afpd.conf

I had to add cf_contents.append("\tzeroconf = no\n") after cf_contents.append("\tmimic model = RackMac\n")
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Keep in mind if you reboot you'll have to reapply your changes. That's why I said that editing the files won't work out so well....
 

kjp4756

Contributor
Joined
Feb 11, 2014
Messages
102
The changes I made to generate_afp_conf.py are sticking after a reboot. When I originally tried changing afp.conf those changes never stuck.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
The changes I made to generate_afp_conf.py are sticking after a reboot. When I originally tried changing afp.conf those changes never stuck.
That's expected (but unsupported) behavior.
I believe 9.3 adds integrity checks to system files, so this kind of method may not work much longer.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
You must have made the boot device writable and changed the settings.

As for 9.3 I think he's okay because the setting is in the GUI already. ;)

BUT, editing the files in 9.3 is gonna be hilarious to do. I can't wait to see all the crybabies that find out the hard way that editing files will end in tears and other "less than satisfactory" situations.
 
Status
Not open for further replies.
Top