tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

logging and silencing /etc/rc output



In order to address PR 41946, I would like to do the following:

  * expose the kernel's boothowto variable via "sysctl kern.boothowto";
  * add a new rc.conf cariable, $rc_silent, defaulting to true or false
    according to the value of the AB_SILENT bin in boothowto;
  * add a post-processor function inside /etc/rc, which will log
    almost all output to /var/run/rc.log, as well as displaying it on
    the console in the usual case; but if $rc_silent is true it will
    display a spinning "twiddle" on the console instead of the usual
    output;
  * allow rc.d scripts to be marked with "KEYWORD: interative" if they
    need user interaction (which implies that hiding their output
    would be bad).

A patch to do the above is available in
<ftp://ftp.netbsd.org/pub/NetBSD/misc/apb/rc.20090905.diff>.
The parts of the patch that affect /etc/rc and /etc/rc.subr
are hard to read, so patched versions of those files are
available from <ftp://ftp.netbsd.org/pub/NetBSD/misc/apb/rc> and
<ftp://ftp.netbsd.org/pub/NetBSD/misc/apb/rc.subr>.

I'd appreciate comments.

--apb (Alan Barrett)


Home | Main Index | Thread Index | Old Index