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)
Oct 1 2024, 5:39 PM
Unknown Object (File)
Oct 1 2024, 3:29 PM
Unknown Object (File)
Sep 26 2024, 1:13 PM
Unknown Object (File)
Sep 24 2024, 4:03 AM
Unknown Object (File)
Sep 18 2024, 6:57 PM
Unknown Object (File)
Sep 13 2024, 8:48 AM
Unknown Object (File)
Sep 8 2024, 4:24 PM
Unknown Object (File)
Sep 7 2024, 8:12 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.