From e4eacf02cae10eca48f6906592981d701b0c1973 Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Wed, 20 Jan 2016 11:19:01 -0600 Subject: 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. --- src/rc/openrc-run.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src') 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); -- cgit v1.2.3