Re: bin/60607: /etc/rc does too much throw-away work and is needlessly slow on constrained systems

"Jason Thorpe via gnats" <[email protected]>
Newsgroups gmane.os.netbsd.bugs
Message-ID <[email protected]>
The following reply was made to PR bin/60607; it has been noted by GNATS.

From: Jason Thorpe <[email protected]>
To: Taylor R Campbell <[email protected]>
Cc: "[email protected]" <[email protected]>,
 "[email protected]" <[email protected]>
Subject: Re: bin/60607: /etc/rc does too much throw-away work and is
 needlessly slow on constrained systems
Date: Mon, 17 Aug 2026 06:42:14 -0700

 > On Aug 17, 2026, at 6:19=E2=80=AFAM, Taylor R Campbell =
 <[email protected]> wrote:
 >=20
 > Can you make this part optional, and/or populated up front at
 > build-time or repopulated on request?  It would be nice if we could
 > boot to multi-user from a read-only /, with all state stored on other
 > file systems like /var, and without spurious EROFS warnings spewed to
 > the console.  (I know we'll hit issues with, e.g., /etc/motd today,
 > but I'd like to avoid adding more issues.)
 
 The cache can=E2=80=99t live on /var because /var might not be available =
 when the cache is required (this would especially be the case for =
 read-only roots).  The only path that=E2=80=99s currently guaranteed to =
 be available when /etc/rc starts processing the rc.d scripts is /etc.  =
 It=E2=80=99s pretty straightforward to suppress any error messages that =
 might occur when writing out the cache (which happens as the last step =
 of the boot process).  And, yes, I can refactor the code that builds and =
 writes out the cache into rc.subr so that there can be a =E2=80=9Cnostart=E2=
 =80=9D rc.d script to rebuild it for those who wish to do that before =
 the next reboot.
 
 -- thorpej
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.