History log of /netbsd-6-1-5-RELEASE/etc/rc
Revision Date Author Comments
# 1.166 11-Aug-2011 apb

branches: 1.166.2; 1.166.8; 1.166.20;
Allow "echo -n" to work as expected in rc.d scripts that are executed
by /etc/rc. Similarly for printf with a format that does not end with
"\n". Previously, the partial line would not be visible on the console
until a newline was printed, possibly after an annoying delay.

This is done by adding echo() and printf() shell functions to rc.subr,
so that naive use of the echo and printf commands in rc.d scripts will
call these functions instead of the underlying commands. These shell
functions send a new "nop" metadata message after the partial line, and
the rc_postprocess function in /etc/rc disentangles the partial line of
plain output from the metadata "nop".

Also add a "-n" option to the print_rc_normal function in rc.subr,
and make some cosmetic changes.