aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-10-03 11:53:20 +0000
committerRoy Marples <roy@marples.name>2007-10-03 11:53:20 +0000
commitab38e54fed14be6b888d915a2a165d10c4474caa (patch)
treed696d93777e5207f9dd79e1864ae181d241b4eca
parent932a4576ce371ae9bdf290f24e76240ec71fb482 (diff)
Fix output for no colour
-rw-r--r--src/rc-status.c5
1 files changed, 4 insertions, 1 deletions
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);
}