From d980798d6444bbfc508796a233e962bf4dd61275 Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Mon, 14 May 2018 19:08:19 -0500 Subject: openrc-run: respect the IN_DRYRUN environment variable This allows rc-service to pass the tryrun option to openrc-run. This is for #225. --- src/rc/openrc-run.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/rc/openrc-run.c b/src/rc/openrc-run.c index 73def8fb..ac682c4c 100644 --- a/src/rc/openrc-run.c +++ b/src/rc/openrc-run.c @@ -1282,6 +1282,8 @@ int main(int argc, char **argv) unsetenv("IN_BACKGROUND"); } + if (rc_yesno(getenv("IN_DRYRUN"))) + dry_run = true; if (rc_yesno(getenv("IN_HOTPLUG"))) { if (!service_plugable()) eerrorx("%s: not allowed to be hotplugged", applet); -- cgit v1.2.3