Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Sep 2017 13:13:52 +0100
From:      Frank Leonhardt <frank2@fjl.co.uk>
To:        freebsd-questions@freebsd.org
Subject:   Re: reread rc.conf without rebooting
Message-ID:  <7ccfe875-6834-0636-29ca-db089b0cf25e@fjl.co.uk>
In-Reply-To: <59A57B99.6030702@gmail.com>
References:  <59A57538.2080806@gmail.com> <49637.128.135.52.6.1504016315.squirrel@cosmo.uchicago.edu> <59A57B99.6030702@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 29/08/2017 15:35, Ernie Luzar wrote:
> Valeri Galtsev wrote:
>> On Tue, August 29, 2017 9:07 am, Ernie Luzar wrote:
>>> After making changes to /etc/rc.conf is there some way to make the host
>>> reread it without rebooting?
>>
>> I only know one way to do it: apply each change (one at a time) by
>> executing relevant command from shell. Why does that not suite you? 
>> You do
>> test (from shell) what is the effect of each change, right?
>>
>> Valeri
>>
>
> You did not understand correctly meaning of post.
>
> I added local_unbound_enable="YES" to rc.conf
>
> It's my understanding that rc.conf is only read at boot time to config 
> services on host.
>
> Question is. Is there some other way to make tis happen without 
> rebooting?

Hi Valeri,

I understand what you mean. I have wanted to be able to do this for a 
very long time but I have never found a way. init (process 1) runs all 
the rc scripts, and AFIK is responsible for parsing them. Restarting 
/sbin/init is almost as drastic and rebooting, and probable less likely 
to work!

The problem is that when you experiment starting and stopping services 
with /etc/rc.d/xxxx or the new service command it is difficult to be 
sure you have put the working commands in /etc/rc.conf. The syntax is 
different and it is also easy to make a mistake when typing.

You CAN put startup configuration lines in /etc/rc.local and run this 
any time you like, but it is run at a different time during startup so 
it is not a perfect solution. However, you do know that exactly the same 
thing will happen at startup.

Regards, Frank.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7ccfe875-6834-0636-29ca-db089b0cf25e>