mirror of
https://github.com/troglobit/finit.git
synced 2026-10-14 10:19:36 +00:00
initctl: slight improvement to status output for sysv services
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
09f46f62b4
commit
30fb9780d7
1 file changed
+7
@@ -664,6 +664,13 @@ static char *svc_command(svc_t *svc, char *buf, size_t len)
|
||||
strlcat(buf, svc->args[i], len);
|
||||
}
|
||||
|
||||
if (svc_is_sysv(svc)) {
|
||||
char *cmd = svc->state == SVC_HALTED_STATE ? "stop" : "start";
|
||||
|
||||
strlcat(buf, " ", len);
|
||||
strlcat(buf, cmd, len);
|
||||
}
|
||||
|
||||
strlcat(buf, bold ? "\e[0m" : "", len);
|
||||
|
||||
return buf;
|
||||
|
||||
Reference in new issue
Block a user