From owner-svn-src-all@freebsd.org Sat Jun 22 00:41:34 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DCBB915C532B; Sat, 22 Jun 2019 00:41:34 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 43AC489189; Sat, 22 Jun 2019 00:41:34 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x5M0fTEu031124; Fri, 21 Jun 2019 17:41:29 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x5M0fTIb031123; Fri, 21 Jun 2019 17:41:29 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201906220041.x5M0fTIb031123@gndrsh.dnsmgr.net> Subject: Re: svn commit: r349256 - head/libexec/rc/rc.d In-Reply-To: To: Don Lewis Date: Fri, 21 Jun 2019 17:41:29 -0700 (PDT) CC: Xin LI , Conrad Meyer , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 43AC489189 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.94 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.939,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Jun 2019 00:41:35 -0000 > 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