Source-Changes archive

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

CVS commit: src



Module Name:    src
Committed By:   apb
Date:           Thu Aug 11 22:52:47 UTC 2011

Modified Files:
        src/etc: rc rc.subr
        src/share/man/man8: rc.subr.8

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.165 -r1.166 src/etc/rc
cvs rdiff -u -r1.87 -r1.88 src/etc/rc.subr
cvs rdiff -u -r1.28 -r1.29 src/share/man/man8/rc.subr.8

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Home | Main Index | Thread Index | Old Index