Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 08 Mar 2014 10:42:56 -0700
From:      Ian Lepore <ian@FreeBSD.org>
To:        Jia-Shiun Li <jiashiun@gmail.com>
Cc:        freebsd-rc@FreeBSD.org, freebsd-arch <freebsd-arch@FreeBSD.org>
Subject:   Re: Teach mdmfs about tmpfs and use tmpfs in rc scripts
Message-ID:  <1394300576.1149.413.camel@revolution.hippie.lan>
In-Reply-To: <CAHNYxxNojO78hEs-36apvq6eaBVEafRhkV4ncK60TehTPdbnGQ@mail.gmail.com>
References:  <1394148413.1149.348.camel@revolution.hippie.lan> <CAHNYxxNSjNMg8hMGL2d%2B223P6gwFJUU%2Bdxnbqcz08SR5A-JDFQ@mail.gmail.com> <1394199416.1149.367.camel@revolution.hippie.lan> <CAHNYxxM3F_aizj%2BJKzqCqiq6o1PEuvG05ZCYRxgGdhnWdSZW0g@mail.gmail.com> <1394290468.1149.397.camel@revolution.hippie.lan> <CAHNYxxNojO78hEs-36apvq6eaBVEafRhkV4ncK60TehTPdbnGQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 2014-03-09 at 01:11 +0800, Jia-Shiun Li wrote:
> On Sat, Mar 8, 2014 at 10:54 PM, Ian Lepore <ian@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. ;)
> 

Part of the reason I jumped on this when you brought it up on the arm
list is because we're heavy users of the readonly rootfs support rc
scripts at $work (and not many people are), so I wanted to make sure the
change wasn't done on the assumption that you can just hard-code tmpfs
in place of md in the rc scripts "and stuff will just keep working".
That's only true for some limited subset of "stuff" and while it's
certainly possible to manually change your rc.conf to match when
upgrading, that's actually hard to do when you're trying to manage
software ranging from freebsd 6 through 11 all with a common config and
build and deployment system.

-- Ian





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1394300576.1149.413.camel>