https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239692
Bug ID: 239692
Summary: rc: Environment variables set via ${name}_env are not
passed to ${rc_arg}_cmd (e.g., start_cmd)
Product: Base System
Version: 11.2-RELEASE
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: bin
Assignee: [email protected]
Reporter: [email protected]
Here are the steps to reproduce:
1. Save the following script as /usr/local/etc/rc.d/teststartcmd and make it
executable:
```
#!/bin/sh
# PROVIDE: teststartcmd
. /etc/rc.subr
name=teststartcmd
load_rc_config $name
start_cmd="teststartcmd_start"
teststartcmd_start() {
env
}
run_rc_command "$1"
```
2. Run `sysrc teststartcmd_env="TESTVARIABLE=foo"` to modify rc.conf.
3. Run `service teststartcmd onestart` and observe that TESTVARIABLE is not in
the output.
4. Save the following script as /usr/local/etc/rc.d/testcommand and make it
executable:
```
#!/bin/sh
# PROVIDE: testcommand
. /etc/rc.subr
name=testcommand
load_rc_config $name
command="/usr/bin/env"
run_rc_command "$1"
```
5. Run `sysrc testcommand_env="TESTVARIABLE=foo"` to modify rc.conf.
6. Run `service testcommand onestart` and observe that TESTVARIABLE is in the
output this time.
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"