diff options
author | William Hubbs <w.d.hubbs@gmail.com> | 2016-01-20 11:19:01 -0600 |
---|---|---|
committer | William Hubbs <w.d.hubbs@gmail.com> | 2016-01-20 11:20:40 -0600 |
commit | e4eacf02cae10eca48f6906592981d701b0c1973 (patch) | |
tree | 1c201c6151890313047896866ede0cff1e1e11bb | |
parent | 30c3561b6b648d60174a22a73555b680d2cc86fc (diff) |
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.
-rw-r--r-- | src/rc/openrc-run.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/rc/openrc-run.c b/src/rc/openrc-run.c index 757412a5..2a4b90d2 100644 --- a/src/rc/openrc-run.c +++ b/src/rc/openrc-run.c @@ -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); |