Am Donnerstag, den 06.11.2014, 21:24 +0100 schrieb Maurice Janssen:

> I suppose the comment in rc.conf should be: for normal use: ""
> Just like most other services.  Is that correct?

A look into rc.subr:

| eval _rcflags=\${${_name}_flags}
[..]
| [ -n "${_rcflags}" ] && daemon_flags=${_rcflags}

Seems that you are correct. Default flags are used when the script is
not configured in rc.conf.local (i.e. started by distribution default,
script started with "-f" or package script), or when flags="".

So how do you define a service to start without any flags set? Seems up
to 5.5 you would have to set ${daemon}_flags=" ". But does this still
work with the parsed rc.conf.local from 5.6?

| _val=${_l##*([!=])=*([[:blank:]])}
| _val=${_val%%#*}
| _val=${_val%%*([[:blank:]])}
| # remove leading and trailing quotes (backwards compat)
| [[ $_val == @(\"*\"|\'*\') ]] && _val=${_val#?} _val=${_val%?}

Looks like _val is being trimmed. So " " should still work as "backwards
compat". 

For me the question is, whether there is a usecase for starting a rc.d
script (which has defined default) flags without any flags. If so, the
line "[ -n "${_rcflags}" ] && daemon_flags=${_rcflags}" should probably
be changed to just "daemon_flags=${_rcflags}" (the rc.conf manpage
implies this behaviour) or the manpage should be changed accordingly.

Regards
        David

-- 
David Dahlberg     

Fraunhofer FKIE, Dept. Communication Systems (KOM) | Tel: +49-228-9435-845
Fraunhoferstr. 20, 53343 Wachtberg, Germany        | Fax: +49-228-856277

Reply via email to