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 57D611382C5 for ; Sat, 24 Feb 2018 23:03:43 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7673AE07C7; Sat, 24 Feb 2018 23:03:41 +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 59EB9E07C7 for ; Sat, 24 Feb 2018 23:03:40 +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 85448335C09 for ; Sat, 24 Feb 2018 23:03:39 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id B2BE01FE for ; Sat, 24 Feb 2018 23:03:37 +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: <1519511048.cfded513cd9b7febe4b7cf39a80411e4303f0655.williamh@OpenRC> Subject: [gentoo-commits] proj/openrc:master commit in: src/rc/ X-VCS-Repository: proj/openrc X-VCS-Files: src/rc/openrc-init.c X-VCS-Directories: src/rc/ X-VCS-Committer: williamh X-VCS-Committer-Name: William Hubbs X-VCS-Revision: cfded513cd9b7febe4b7cf39a80411e4303f0655 X-VCS-Branch: master Date: Sat, 24 Feb 2018 23:03:37 +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: 11b5d556-378e-435d-8af7-affb5e29271c X-Archives-Hash: 0279531891c8dce129643079c0ac36e8 commit: cfded513cd9b7febe4b7cf39a80411e4303f0655 Author: William Hubbs gmail com> AuthorDate: Sat Feb 24 22:24:08 2018 +0000 Commit: William Hubbs gentoo org> CommitDate: Sat Feb 24 22:24:08 2018 +0000 URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=cfded513 openrc-init: set a default path The default path provided by the system if one isn't set only includes "/bin:/usr/bin". This adds the default path setting from sysvinit. src/rc/openrc-init.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/rc/openrc-init.c b/src/rc/openrc-init.c index eb346f59..de570e56 100644 --- a/src/rc/openrc-init.c +++ b/src/rc/openrc-init.c @@ -35,6 +35,7 @@ #include "rc-wtmp.h" #include "version.h" +static const char *path_default = "/sbin:/usr/sbin:/bin:/usr/bin"; static const char *rc_default_runlevel = "default"; static pid_t do_openrc(const char *runlevel) @@ -183,6 +184,9 @@ int main(int argc, char **argv) sigaction(SIGINT, &sa, NULL); reboot(RB_DISABLE_CAD); + /* set default path */ + setenv("PATH", path_default, 1); + if (! reexec) init(default_runlevel);