Teach mdmfs about tmpfs and use tmpfs in rc scripts

Jia-Shiun Li jiashiun at gmail.com
Sat Mar 8 17:12:25 UTC 2014


On Sat, Mar 8, 2014 at 10:54 PM, Ian Lepore <ian at freebsd.org> wrote:
> Okay, if people think that all this work should be done in the rc
> scripts rather than in a program, then the rc scripts need to be changed
> to do what I did in the program: honor existing options that make sense
> for tmpfs (any -o options for the mount, translate -s to size=, and
> don't use tmpfs if the config requests multilabel MAC).  And the changes
> need to happen in rc.subr and in rc.initdiskless which doesn't use
> rc.subr.  Oh, and of course, don't do any of it if tmpfs isn't
> available.
>
> If this isn't done, peoples' existing configurations may break (in the
> case of the MAC option, break in a way with potential security
> implications).
>
> I've gotta say, I don't understand the basic resistance to having a
> single unified tool for configuring a memory filesystem.
>

Probably because we were focusing on the usual rc case?
For the usual rc case it is easier to change scripts to use
tmpfs altogether. But it will break compatibility of rc.conf
flags too. Upgraded users will need to modify them manually.
And I am not sure if there are more advanced uses, like
setting multilabel for /var & /tmp. In these cases your
patch makes more sense.

Think that's just us not catching your point yet. ;)

-Jia-Shiun.


More information about the freebsd-arch mailing list