From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A7E32138331 for ; Tue, 15 May 2018 00:11:53 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 98845E09A2; Tue, 15 May 2018 00:11:52 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7181BE08FC for ; Tue, 15 May 2018 00:11:52 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 69009335C74 for ; Tue, 15 May 2018 00:11:50 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id AACD3297 for ; Tue, 15 May 2018 00:11:48 +0000 (UTC) From: "William Hubbs" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "William Hubbs" Message-ID: <1526342899.d980798d6444bbfc508796a233e962bf4dd61275.williamh@OpenRC> Subject: [gentoo-commits] proj/openrc:master commit in: src/rc/ X-VCS-Repository: proj/openrc X-VCS-Files: src/rc/openrc-run.c X-VCS-Directories: src/rc/ X-VCS-Committer: williamh X-VCS-Committer-Name: William Hubbs X-VCS-Revision: d980798d6444bbfc508796a233e962bf4dd61275 X-VCS-Branch: master Date: Tue, 15 May 2018 00:11:48 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 2d66869b-a7da-406f-87ef-569509755306 X-Archives-Hash: 89382e52cf89374e14d6969fcd7db1da commit: d980798d6444bbfc508796a233e962bf4dd61275 Author: William Hubbs gmail com> AuthorDate: Tue May 15 00:08:19 2018 +0000 Commit: William Hubbs gentoo org> CommitDate: Tue May 15 00:08:19 2018 +0000 URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=d980798d 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);