Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153114034
D21228.id60675.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D21228.id60675.diff
View Options
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
+ set -a
+ eval $_env
+ set +a
_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 12, 2019
.Dt RC.SUBR 8
.Os
.Sh NAME
@@ -561,7 +561,18 @@
with.
This will be passed as arguments to the
.Xr env 1
-utility.
+utility if
+.Va command
+is set.
+In the other case, however,
+when
+.Ar argument Ns Va _cmd
+is defined instead,
+the contents of
+.Va ${name}_env
+the will be evaluated with
+.Xr sh 1
+eval and variables set there will be exported.
.It Va ${name}_env_file
A file to source for environmental variables to run
.Va command
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Apr 20, 6:22 AM (6 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31823097
Default Alt Text
D21228.id60675.diff (1 KB)
Attached To
Mode
D21228: rc: Honor ${name}_env when a custom *_cmd is defined (e.g., start_cmd)
Attached
Detach File
Event Timeline
Log In to Comment