Date: Fri, 21 Jun 2019 17:41:29 -0700 (PDT) From: "Rodney W. Grimes" <freebsd@gndrsh.dnsmgr.net> To: Don Lewis <truckman@freebsd.org> Cc: Xin LI <delphij@gmail.com>, Conrad Meyer <cem@freebsd.org>, "src-committers@freebsd.org" <src-committers@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org> Subject: Re: svn commit: r349256 - head/libexec/rc/rc.d Message-ID: <201906220041.x5M0fTIb031123@gndrsh.dnsmgr.net> In-Reply-To: <tkrat.0a317df2dfe56424@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> On 21 Jun, Xin LI wrote: > > > But ultimately, I think the real design question here that needs to be > > solved would probably be "Why are piling up multiple layers of workarounds > > around motd? Does it even need to be located in /etc?" The contents is > > meant to be updated every time when there is a kernel change, and to that > > extent it seems to be more appropriate for /var/run and generated at boot > > from a template located somewhere in /etc. The benefit of this approach is > > that you would have one less file to merge for each etcupdate/mergemaster > > (or at least only need to do it when some customization is made), and there > > is no need to worry about write durability. > > +1 > > This is something that has bothered me for a long time. It should be > possible to run with a read-only /etc (obviously with some functional > limitations). The updating of the kernel string in /etc/motd is what should go, that was done before the days of uname, so was more important, but now it is rather pointless to have the kernel name and version in motd. Just go back to earlier days and leave motd as it was intended, the Message of The Day from the system administrator(s). If you want readonly / you do: cd /etc mkdir ../var/etc mv motd ../var/etc ln -s ../var/etc/motd If your head hurts from the .. it is from decades of me doing chrooted stuff, sorry, just how my brain fires. You need to do the above to a fistfull of other files too, and iirc there are some issues with passwd as it unlinks the symlinks. For simpler readonly / you do: cd / mv etc var ln -s var/etc this one works very well and is what I use in my nfs diskless setups to share a readonly / as each node has its own /var file system, / and /usr are shared. /tmp varies depending on what i am doing, but most often a tmpfs. I do not use the standard freebsd diskless /var tar ball, my /var's are persistant accross reboots and are per node. -- Rod Grimes rgrimes@freebsd.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201906220041.x5M0fTIb031123>