From ab38e54fed14be6b888d915a2a165d10c4474caa Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Wed, 3 Oct 2007 11:53:20 +0000 Subject: Fix output for no colour --- src/rc-status.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/rc-status.c b/src/rc-status.c index cc26716f..2d80d5dd 100644 --- a/src/rc-status.c +++ b/src/rc-status.c @@ -30,7 +30,7 @@ static void print_level (char *level) static void print_service (char *service) { char status[10]; - int cols = printf (" %s\n", service); + int cols = printf (" %s", service); rc_service_state_t state = rc_service_state (service); einfo_color_t color = ECOLOR_BAD; @@ -54,6 +54,9 @@ static void print_service (char *service) color = ECOLOR_WARN; } else snprintf (status, sizeof (status), " stopped "); + + if (! rc_env_bool ("RC_NOCOLOR")) + printf ("\n"); ebracket (cols, color, status); } -- cgit v1.2.3