Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Feb 2021 03:14:58 GMT
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: f7ba064978f8 - stable/12 - service(8): set the environment of the "daemon" class before invoking
Message-ID:  <202102040314.1143EwZZ093560@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by kevans:

URL: https://cgit.FreeBSD.org/src/commit/?id=f7ba064978f84d07cd3ebbcbba3decc8a515cee3

commit f7ba064978f84d07cd3ebbcbba3decc8a515cee3
Author:     Andrew Gierth <andrew@tao11.riddles.org.uk>
AuthorDate: 2020-02-05 04:32:49 +0000
Commit:     Kyle Evans <kevans@FreeBSD.org>
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
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202102040314.1143EwZZ093560>