From owner-dev-commits-src-all@freebsd.org Thu Feb 4 03:14:59 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 316A5535CED; Thu, 4 Feb 2021 03:14:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DWNvk5R9fz4jsh; Thu, 4 Feb 2021 03:14:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7247F2C8DA; Thu, 4 Feb 2021 03:14:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1143EwLg093561; Thu, 4 Feb 2021 03:14:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1143EwZZ093560; Thu, 4 Feb 2021 03:14:58 GMT (envelope-from git) Date: Thu, 4 Feb 2021 03:14:58 GMT Message-Id: <202102040314.1143EwZZ093560@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: f7ba064978f8 - stable/12 - service(8): set the environment of the "daemon" class before invoking MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: f7ba064978f84d07cd3ebbcbba3decc8a515cee3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2021 03:15:02 -0000 The branch stable/12 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=f7ba064978f84d07cd3ebbcbba3decc8a515cee3 commit f7ba064978f84d07cd3ebbcbba3decc8a515cee3 Author: Andrew Gierth AuthorDate: 2020-02-05 04:32:49 +0000 Commit: Kyle Evans CommitDate: 2021-02-04 03:14:27 +0000 service(8): set the environment of the "daemon" class before invoking As mentioned in r357562, this gives the user a single place to configure environment variables that need to be used for various services -- the "daemon" class -- for, e.g., configuring a system-wide HTTP proxy. This is a part of D21481. (cherry picked from commit 736a5a6d1dbbdae68eb102c2ba9c114aafd61821) --- usr.sbin/service/service.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/service/service.sh b/usr.sbin/service/service.sh index fa002fb0a817..42a50fcf61b9 100755 --- a/usr.sbin/service/service.sh +++ b/usr.sbin/service/service.sh @@ -165,7 +165,7 @@ cd / for dir in /etc/rc.d $local_startup; do if [ -x "$dir/$script" ]; then [ -n "$VERBOSE" ] && echo "$script is located in $dir" - exec env -i HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin $dir/$script "$@" + exec env -i -L 0/daemon HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin "$dir/$script" "$@" fi done