From fc1bfe4234714cdcc6b158ec04cb3f92c7c8caa7 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Fri, 28 Sep 2007 15:04:15 +0000 Subject: Crashed is not a baselayout state as such --- src/runscript.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/runscript.c') diff --git a/src/runscript.c b/src/runscript.c index dfe41850..bd404cd2 100644 --- a/src/runscript.c +++ b/src/runscript.c @@ -459,11 +459,12 @@ static rc_service_state_t svc_status () } else if (state & RC_SERVICE_INACTIVE) { snprintf (status, sizeof (status), "inactive"); e = &ewarn; - } else if (state & RC_SERVICE_CRASHED) { - snprintf (status, sizeof (status), "crashed"); - e = &eerror; } else if (state & RC_SERVICE_STARTED) { - snprintf (status, sizeof (status), "started"); + if (geteuid () == 0 && rc_service_daemons_crashed (service)) { + snprintf (status, sizeof (status), "crashed"); + e = &eerror; + } else + snprintf (status, sizeof (status), "started"); } else snprintf (status, sizeof (status), "stopped"); -- cgit v1.2.3