Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Aug 2017 14:44:59 +0930
From:      Shane Ambler <FreeBSD@ShaneWare.Biz>
To:        Ernie Luzar <luzar722@gmail.com>
Cc:        freebsd-questions <freebsd-questions@freebsd.org>
Subject:   Re: reread rc.conf without rebooting
Message-ID:  <f101fce7-4e48-54db-54f5-3f47b28ced7f@ShaneWare.Biz>
In-Reply-To: <59A581DB.10402@gmail.com>
References:  <59A57538.2080806@gmail.com> <49637.128.135.52.6.1504016315.squirrel@cosmo.uchicago.edu> <59A57B99.6030702@gmail.com> <4f253592-7d81-29c6-7e94-a0fd4d6cba58@gmx.com> <59A581DB.10402@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 30/08/2017 00:31, Ernie Luzar wrote:
> 
> If the local_unbound service is not all ready running the
> "service local_unbound restart" command does not work.

It should, `service x restart` is the same as `service x stop` and then
`service x start` it just saves you doing two steps manually.

> My problem is with the built in unbound. Testing has proven that issuing 
> "service local_unbound onestart" before unbound has been first started 
> by a reboot is causing config problem generated by unbound first time 
> only setup script.

onestart/onerestart is only needed if the rcvar for the service is not
enabled in rc.conf.

> I am trying to debug what is wrong with the config setup for the built 
> in version.

What errors are you seeing? anything in the console? /var/log/messages?
Do you have unbound or bind already running? Do you get anything from
sockstat -4 -6 -p 53

> So the answer to my original question is, there is NO way to cause the 
> rc.conf file to be reread and re-processed without a reboot.

rc.conf is read when a script using settings contained in it is run.
That is, it is read by `service x start` so any changes saved before you
run `service x start` will be in effect.

You will find all rc scripts will use `load_rc_config` to read in any
config variables they are interested in.

By enabling a service in rc.conf you have to manually start the service
if you don't want to restart the machine. Similarly any config changes
will only be in effect if you manually restart the effected service or
restart the machine.


-- 
FreeBSD - the place to B...Software Developing

Shane Ambler




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?f101fce7-4e48-54db-54f5-3f47b28ced7f>