From owner-freebsd-questions@freebsd.org Wed Aug 30 05:20:24 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31C88DEF717 for ; Wed, 30 Aug 2017 05:20:24 +0000 (UTC) (envelope-from FreeBSD@shaneware.biz) Received: from ipmail07.adl2.internode.on.net (ipmail07.adl2.internode.on.net [150.101.137.131]) by mx1.freebsd.org (Postfix) with ESMTP id C263F83977 for ; Wed, 30 Aug 2017 05:20:23 +0000 (UTC) (envelope-from FreeBSD@shaneware.biz) Received: from unknown (HELO leader.local) ([118.211.113.221]) by ipmail07.adl2.internode.on.net with ESMTP; 30 Aug 2017 14:45:02 +0930 Subject: Re: reread rc.conf without rebooting To: Ernie Luzar Cc: freebsd-questions 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> From: Shane Ambler Message-ID: Date: Wed, 30 Aug 2017 14:44:59 +0930 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <59A581DB.10402@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-AU Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Aug 2017 05:20:24 -0000 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