Append to "command" in rec script

Mateusz Piotrowski 0mp at FreeBSD.org
Thu Nov 8 20:32:17 UTC 2018


>>On Thu, 8 Nov 2018 18:13:24 +0000, Carmel NY wrote:  
>>> I am attempting to create an "rc" script to start a program I am working
>>> on. I want, if possible, for the user to enter something in the rc.conf
>>> file to be added to the "command" string when the program is started.
>>> 
>>> EXAMPLE:
>>> 
>>> In the rc script, this is present
>>> 
>>> command=/usr/local/bin/MyProg
>>> 
>>> Now, suppose the user wanted to activate logging. They could modify the rc
>>> script and append an "-l" to the command string. However, I would rather
>>> they entered options in the rc.conf file    

Don't you look for ${name}_flags (see rc.subr(8)).


More information about the freebsd-questions mailing list