From 6b01325aadd949b451dd201667a3f0d088337208 Mon Sep 17 00:00:00 2001 From: Chris Lamb Date: Fri, 8 Aug 2008 03:49:51 +0100 Subject: make log_begin_msg not emit trailing newline Please make log_begin_msg not emit a trailing newline - this makes the non- "quiet" output cleaner and results in half as many lines being emitted. For example: Begin: Finding root filesytem ... Done. Becomes: Begin: Finding root filesytem ... done. Patch attached - it also adds a space and alters the case of "done" for symmetry. This would be especially useful in Debian Live where we show a large number of these messages by default. (closes: #494257) --- scripts/functions | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'scripts') diff --git a/scripts/functions b/scripts/functions index a004c9e..5a896f1 100644 --- a/scripts/functions +++ b/scripts/functions @@ -3,22 +3,22 @@ _log_msg() { if [ "$quiet" = "y" ]; then return; fi - echo "$@" + printf "$@" } log_success_msg() { - _log_msg "Success: $@" + _log_msg "Success: $@\n" } log_failure_msg() { - _log_msg "Failure: $@" + _log_msg "Failure: $@\n" } log_warning_msg() { - _log_msg "Warning: $@" + _log_msg "Warning: $@\n" } log_begin_msg() @@ -26,7 +26,7 @@ log_begin_msg() if [ -x /sbin/usplash_write ]; then /sbin/usplash_write "TEXT $@" fi - _log_msg "Begin: $@ ..." + _log_msg "Begin: $@ ... " } log_end_msg() @@ -34,7 +34,7 @@ log_end_msg() if [ -x /sbin/usplash_write ]; then /sbin/usplash_write "SUCCESS ok" fi - _log_msg "Done." + _log_msg "done.\n" } panic() -- cgit v1.2.3