Page MenuHomeFreeBSD

Split auto_master file into /etc/autofs/master_*
AbandonedPublic

Authored by cperciva on May 8 2020, 5:57 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Oct 19, 6:32 PM
Unknown Object (File)
Sun, Oct 19, 6:32 PM
Unknown Object (File)
Sun, Oct 19, 4:26 AM
Unknown Object (File)
Tue, Oct 7, 1:43 AM
Unknown Object (File)
Mon, Oct 6, 9:18 PM
Unknown Object (File)
Mon, Oct 6, 4:15 PM
Unknown Object (File)
Mon, Oct 6, 1:28 PM
Unknown Object (File)
Aug 2 2025, 3:15 PM
Subscribers
None

Details

Reviewers
trasz
Summary

Split the lines in auto_master into three /etc/autofs/master_* files.

Comment out the '/net' autofs mount in auto_master, but add it to the
default value of the autofs_masters rc.conf variable, in order to retain
the current default behaviour (wherein setting autofs_enable="YES" in
rc.conf turns on the '/net' mount if auto_master is not changed).

This makes it possible for users who want autofs but don't want /net to
get that configuration by editing just rc.conf.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

cperciva created this revision.

Depends on D24763.

I'm not a huge fan of this idea, tbh.

It makes our autofs configuration differ significantly from all the other systems. It makes using automount(8) directly - just rerunning it to refresh the mounts, or using 'automount -L' - more complicated and error-prone. It violates POLA. But the main problem is, I just don't see how enabling something in rc.conf is fundamentally easier than enabling it in its usual configuration file. In this particular case it should be even easier - just add that one line from the AWS release(7) script, the same one that creates /etc/autofs/special_efs.

A nicer way to do it would be to expand the existing include mechanism; Linux seems to support the '+source:map' syntax; we could use the source to indicate include directory.

Good point about automount -L. I do like the idea of rc.conf as a "master control file" because I think it's easier for users (especially new users) if they can configure as much as possible from a single place, but the fact that automount is invoked directly rather than always via the rc.d system makes this problematic.