openrc-run: respect the IN_DRYRUN environment variable
This allows rc-service to pass the tryrun option to openrc-run. This is for #225.
This commit is contained in:
parent
414a9aae6c
commit
d980798d64
@ -1282,6 +1282,8 @@ int main(int argc, char **argv)
|
|||||||
unsetenv("IN_BACKGROUND");
|
unsetenv("IN_BACKGROUND");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (rc_yesno(getenv("IN_DRYRUN")))
|
||||||
|
dry_run = true;
|
||||||
if (rc_yesno(getenv("IN_HOTPLUG"))) {
|
if (rc_yesno(getenv("IN_HOTPLUG"))) {
|
||||||
if (!service_plugable())
|
if (!service_plugable())
|
||||||
eerrorx("%s: not allowed to be hotplugged", applet);
|
eerrorx("%s: not allowed to be hotplugged", applet);
|
||||||
|
Loading…
Reference in New Issue
Block a user