mirror of
https://github.com/troglobit/finit.git
synced 2026-10-04 14:54:14 +07:00
Custom conditions include :ID; 'name:foo :bar' => svc/foo/bar
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
+1
-1
@@ -83,7 +83,7 @@ char *mkcond(svc_t *svc, char *buf, size_t len)
|
|||||||
|
|
||||||
/* Custom name:foo declaration found => svc/foo instead of /svc/bin/path/pidfile-.pid */
|
/* Custom name:foo declaration found => svc/foo instead of /svc/bin/path/pidfile-.pid */
|
||||||
if (strcmp(nm, svc->name)) {
|
if (strcmp(nm, svc->name)) {
|
||||||
snprintf(buf, len, "svc/%s", svc->name);
|
snprintf(buf, len, "svc/%s/%s", svc->name, svc->id);
|
||||||
_d("Composed condition from svc->name %s => %s", svc->name, buf);
|
_d("Composed condition from svc->name %s => %s", svc->name, buf);
|
||||||
} else {
|
} else {
|
||||||
snprintf(buf, len, "svc%s%s%s", path[0] != 0 && path[0] != '/' ? "/" : "", path, ptr);
|
snprintf(buf, len, "svc%s%s%s", path[0] != 0 && path[0] != '/' ? "/" : "", path, ptr);
|
||||||
|
|||||||
Reference in New Issue
Block a user