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, Apr 21, 9:28 AM
Unknown Object (File)
Jan 10 2024, 12:10 AM
Unknown Object (File)
Dec 23 2023, 1:18 AM
Unknown Object (File)
Sep 22 2023, 9:17 PM
Unknown Object (File)
Sep 2 2023, 7:33 PM
Unknown Object (File)
Jun 25 2023, 6:52 PM
Unknown Object (File)
Feb 4 2023, 11:35 PM
Unknown Object (File)
Jan 4 2023, 9:51 AM
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.