initctl: Only show service name, not path, with plain show

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2016-03-16 13:06:47 +01:00
parent 2555fe8e96
commit cef4b5761a
+8 -1
View File
@@ -247,7 +247,14 @@ static int show_status(char *arg)
printf("%-10.10s ", lvls);
if (!verbose) {
printf("%-20s %s\n", svc->cmd, svc->desc);
char *name = strrchr(svc->cmd, '/');
if (!name)
name = svc->cmd;
else
name++;
printf("%-20s %s\n", name, svc->desc);
continue;
}