mirror of
https://github.com/troglobit/finit.git
synced 2026-11-17 19:30:29 +00:00
Merge pull request #22 from westermo/wmo/2.4
initctl: Only show service name, not path, with plain show
This commit is contained in:
commit
0467c571df
1 file changed
+8
-1
@@ -248,7 +248,14 @@ static int show_status(char *arg)
|
|||||||
printf("%-10.10s ", lvls);
|
printf("%-10.10s ", lvls);
|
||||||
|
|
||||||
if (!verbose) {
|
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;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user