Page MenuHomeFreeBSD

D21228.id61448.diff
No OneTemporary

D21228.id61448.diff

Index: libexec/rc/rc.subr
===================================================================
--- libexec/rc/rc.subr
+++ libexec/rc/rc.subr
@@ -1036,6 +1036,9 @@
_postcmd=\$${rc_arg}_postcmd
if [ -n "$_cmd" ]; then
+ if [ -n "$_env" ]; then
+ eval "export -- $_env"
+ fi
_run_rc_precmd || return 1
_run_rc_doit "$_cmd $rc_extra_args" || return 1
_run_rc_postcmd
Index: share/man/man8/rc.subr.8
===================================================================
--- share/man/man8/rc.subr.8
+++ share/man/man8/rc.subr.8
@@ -29,7 +29,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd January 5, 2019
+.Dd August 29, 2019
.Dt RC.SUBR 8
.Os
.Sh NAME
@@ -559,9 +559,22 @@
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

File Metadata

Mime Type
text/plain
Expires
Fri, Apr 3, 12:09 PM (12 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30756931
Default Alt Text
D21228.id61448.diff (1 KB)

Event Timeline