aboutsummaryrefslogtreecommitdiff
path: root/src/rc
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2018-05-14 19:08:19 -0500
committerWilliam Hubbs <w.d.hubbs@gmail.com>2018-05-14 19:08:19 -0500
commitd980798d6444bbfc508796a233e962bf4dd61275 (patch)
treec7f884f017bd2b360f8d0bd8698c8241a3067730 /src/rc
parent414a9aae6ce066d2a6ad42e7e24d1c12a7b46409 (diff)
openrc-run: respect the IN_DRYRUN environment variable
This allows rc-service to pass the tryrun option to openrc-run. This is for #225.
Diffstat (limited to 'src/rc')
-rw-r--r--src/rc/openrc-run.c2
1 files changed, 2 insertions, 0 deletions
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);