On Sat, Nov 11, 2017 at 07:09:13PM +0000, Christer Solskogen wrote:
> If ifstated.conf have a error this will happen:
>
> # ifstated
> -d
>
> /etc/ifstated.conf:35: syntax error
> /etc/ifstated.conf:38: syntax error
> error: state 'fw_slave' not declared
> error: state 'fw_slave' not declared
> unable to load config
>
> But with the same config:
> # /etc/rc.d/ifstated
> start
>
> ifstated(ok)
> # echo $?
> 0
> I would expect that it would say something like this, like other daemons do.
> ifstated(failed)
Yes, that's an known issue with several privsep daemons in OpenBSD...
Maybe we could add an rc_pre function like this:
# child will not return a config parsing error to the parent
rc_pre() {
${daemon} -n ${daemon_flags}
}
--
Antoine