Append to "command" in rec script

Carmel NY carmel_ny at outlook.com
Thu Nov 8 20:12:08 UTC 2018


On Thu, 8 Nov 2018 19:38:53 +0100, Polytropon stated:

>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  
>
>Maybe read "man 5 rc.conf" and put non-FreeBSD (or at
>least "experimental" stuff) in /etc/rc.conf.local.
>The difference between rc.conf and rc.conf.local is
>not as big in FreeBSD as it is in OpenBSD. ;-)

Actually, man 8 rc.subr is a lot more useful. However, it doesn't give me
what I want. Also, I have been having a problem with "run_rc_command"
chocking on complex startup options placed in the rc.conf file. I am still
trying to debug that one.

-- 
Carmel


More information about the freebsd-questions mailing list