diff options
| author | Roy Marples <roy@marples.name> | 2007-09-28 15:04:15 +0000 | 
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2007-09-28 15:04:15 +0000 | 
| commit | fc1bfe4234714cdcc6b158ec04cb3f92c7c8caa7 (patch) | |
| tree | b56a10eea9c3fbe8134dc294e831c8e2c6d398d2 /src/rc-status.c | |
| parent | 7274301be24a70c094e8c91a36f3e8b6156f53ba (diff) | |
| download | openrc-fc1bfe4234714cdcc6b158ec04cb3f92c7c8caa7.tar.xz | |
Crashed is not a baselayout state as such
Diffstat (limited to 'src/rc-status.c')
| -rw-r--r-- | src/rc-status.c | 16 | 
1 files changed, 9 insertions, 7 deletions
diff --git a/src/rc-status.c b/src/rc-status.c index dacbe851..b862a27c 100644 --- a/src/rc-status.c +++ b/src/rc-status.c @@ -35,23 +35,25 @@ static void print_service (char *service)  	einfo_color_t color = ECOLOR_BAD;  	if (state & RC_SERVICE_STOPPING) -		snprintf (status, sizeof (status),   "stopping "); +		snprintf (status, sizeof (status), "stopping ");  	else if (state & RC_SERVICE_STARTING) {  		snprintf (status, sizeof (status), "starting ");  		color = ECOLOR_WARN;  	} else if (state & RC_SERVICE_INACTIVE) {  		snprintf (status, sizeof (status), "inactive ");  		color = ECOLOR_WARN; -	} else if (state & RC_SERVICE_CRASHED) -		snprintf (status, sizeof (status),   " crashed "); -	else if (state & RC_SERVICE_STARTED) { -		snprintf (status, sizeof (status), " started "); -		color = ECOLOR_GOOD; +	} else if (state & RC_SERVICE_STARTED) { +		if (geteuid () == 0 && rc_service_daemons_crashed (service)) +			snprintf (status, sizeof (status), " crashed "); +		else { +			snprintf (status, sizeof (status), " started "); +			color = ECOLOR_GOOD; +		}  	} else if (state & RC_SERVICE_SCHEDULED) {  		snprintf (status, sizeof (status), "scheduled");  		color = ECOLOR_WARN;  	} else -		snprintf (status, sizeof (status),   " stopped "); +		snprintf (status, sizeof (status), " stopped ");  	ebracket (cols, color, status);  }  | 
