openrc-run: in verbose mode, log execution of the shell script
This is to show when openrc-run runs the openrc-run.sh script; it is used for debugging.
This commit is contained in:
parent
30c3561b6b
commit
e4eacf02ca
@ -390,6 +390,14 @@ svc_exec(const char *arg1, const char *arg2)
|
||||
}
|
||||
|
||||
if (exists(RC_SVCDIR "/openrc-run.sh")) {
|
||||
if (arg2)
|
||||
einfov("Executing: %s %s %s %s %s",
|
||||
RC_SVCDIR "/openrc-run.sh", RC_SVCDIR "/openrc-run.sh",
|
||||
service, arg1, arg2);
|
||||
else
|
||||
einfov("Executing: %s %s %s %s",
|
||||
RC_SVCDIR "/openrc-run.sh", RC_SVCDIR "/openrc-run.sh",
|
||||
service, arg1);
|
||||
execl(RC_SVCDIR "/openrc-run.sh",
|
||||
RC_SVCDIR "/openrc-run.sh",
|
||||
service, arg1, arg2, (char *) NULL);
|
||||
@ -397,6 +405,16 @@ svc_exec(const char *arg1, const char *arg2)
|
||||
service, strerror(errno));
|
||||
_exit(EXIT_FAILURE);
|
||||
} else {
|
||||
if (arg2)
|
||||
einfov("Executing: %s %s %s %s %s",
|
||||
RC_LIBEXECDIR "/sh/openrc-run.sh",
|
||||
RC_LIBEXECDIR "/sh/openrc-run.sh",
|
||||
service, arg1, arg2);
|
||||
else
|
||||
einfov("Executing: %s %s %s %s",
|
||||
RC_LIBEXECDIR "/sh/openrc-run.sh",
|
||||
RC_LIBEXECDIR "/sh/openrc-run.sh",
|
||||
service, arg1);
|
||||
execl(RC_LIBEXECDIR "/sh/openrc-run.sh",
|
||||
RC_LIBEXECDIR "/sh/openrc-run.sh",
|
||||
service, arg1, arg2, (char *) NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user