tech-userlevel archive

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

Re: logging and silencing /etc/rc output



On Sat, 05 Sep 2009, Alan Barrett wrote:
> 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 variable, $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: interactive" if they
>     need user interaction (which implies that hiding their output
>     would be bad).

I received two comments, both asking for the ability to do something
other than twiddle for each line of suppressed output.  I have now added
an $rc_silent_cmd variable, which defaults to "twiddle", but which can
be set to any command, such as ":" to suppress output entirely.  If you
need it to send a special message to your fancy splash screen animation
driver, you will have to supply your own command.

An updated patch is available from
<ftp://ftp.netbsd.org/pub/NetBSD/misc/apb/rc.20090909.diff>.  As
before, patched copies of rc and rc.subr are also available,
from <ftp://ftp.netbsd.org/pub/NetBSD/misc/apb/rc> and
<ftp://ftp.netbsd.org/pub/NetBSD/misc/apb/rc.subr>.

I intend to commit this in a few days, or as soon as the original
commenters indicate satisfaction, whichever comes first.

--apb (Alan Barrett)


Home | Main Index | Thread Index | Old Index