aboutsummaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorMateusz Piotrowski <0mp@FreeBSD.org>2019-09-05 14:52:22 +0000
committerMateusz Piotrowski <0mp@FreeBSD.org>2019-09-05 14:52:22 +0000
commitd15e810db9a57833272cceffa41998575360cb0c (patch)
tree66256618f29a7c8b41e9d5d0d5b5dcf31de28e34 /share
parent92fd0827c16e521afb026c0290ab30884fb496a4 (diff)
downloadsrc-d15e810db9a57833272cceffa41998575360cb0c.tar.gz
src-d15e810db9a57833272cceffa41998575360cb0c.zip
rc: Honor ${name}_env when a custom *_cmd is defined (e.g., start_cmd)
A user may set ${name}_env variable in rc.conf(5) in order to set additional environment variables for a service command. Unfortunately, at the moment this variable is only honored when the command is specified via the command variable. Those additional environment variables coming from ${name}_env are never set if the service is started via the ${rc_arg}_cmd variable (for example start_cmd). PR: 239692 Reviewed by: bcr, jilles Approved by: src (jilles) Differential Revision: https://reviews.freebsd.org/D21228
Notes
Notes: svn path=/head/; revision=351863
Diffstat (limited to 'share')
-rw-r--r--share/man/man8/rc.subr.816
1 files changed, 13 insertions, 3 deletions
diff --git a/share/man/man8/rc.subr.8 b/share/man/man8/rc.subr.8
index e039d148744d..f506c143cade 100644
--- a/share/man/man8/rc.subr.8
+++ b/share/man/man8/rc.subr.8
@@ -29,7 +29,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd January 5, 2019
+.Dd September 5, 2019
.Dt RC.SUBR 8
.Os
.Sh NAME
@@ -559,9 +559,19 @@ is mounted.
A list of environment variables to run
.Va command
with.
-This will be passed as arguments to the
+Those variables will be passed as arguments to the
.Xr env 1
-utility.
+utility unless
+.Ar argument Ns Va _cmd
+is defined.
+In that case the contents of
+.Va ${name}_env
+will be exported via the
+.Xr export 1
+builtin of
+.Xr sh 1 ,
+which puts some limitations on the names of variables
+(e.g., a variable name may not start with a digit).
.It Va ${name}_env_file
A file to source for environmental variables to run
.Va command