Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Sep 2015 14:03:07 -0700
From:      Devin Teske <dteske@panzura.com>
To:        Pavel Timofeev <timp87@gmail.com>
Cc:        freebsd-hackers@freebsd.org, Devin Teske <dteske@FreeBSD.org>
Subject:   Re: How to control and setup service?
Message-ID:  <D1D47194-00C7-4CAA-A7DF-2F25621E1A65@panzura.com>
In-Reply-To: <CAAoTqfvxUznJp%2BtguAaYQ=5HfKXTG%2BGxY644wvqm4e9=E8WuHw@mail.gmail.com>
References:  <CAAoTqfvxUznJp%2BtguAaYQ=5HfKXTG%2BGxY644wvqm4e9=E8WuHw@mail.gmail.com>

index | next in thread | previous in thread | raw e-mail


> On Aug 27, 2015, at 6:21 AM, Pavel Timofeev <timp87@gmail.com> wrote:
> 
[snip]
> there is no way to ask FreeBSD for a complete list of startup dirs.
> 

Aside from the way you mentioned (snipped), there’s the following:
# echo /etc/rc.d $( sysrc -n local_startup )


[snip]
> 
> But, FreeBSD has more places with higher precedence than /etc/rc.conf!
> It's /etc/rc.conf.local file,
> then /etc/rc.conf.d/$service file,
> then /etc/rc.conf.d/$service/* files.
> Then even /usr/local/etc/rc.conf.d/$service files and subdirs which
> appeared in FreeBSD 10!
> 

D’Oh, didn’t realize that rc.conf.d/$name could be a directory.
Looks like I’ll have to update the following:

https://reviews.freebsd.org/D3551 <https://reviews.freebsd.org/D3551>;
sysrc: Add support for ``rc.conf.d'' service(8) configuration file(s)


> And there is no way to ask FreeBSD "Hey! Where is your config files to
> control services?”.

I am adding that in the above review (D3551). Usage:

# sysrc -l
/etc/rc.conf /etc/rc.conf.local

# sysrc -ls ipfw
/etc/rc.conf /etc/rc.conf.local /etc/rc.conf.d/ipfw /usr/local/etc/rc.conf.d/ipfw

# sysrc -ls dhclient
/etc/rc.conf /etc/rc.conf.local /etc/rc.conf.d/dhclient /usr/local/etc/rc.conf.d/dhclient /etc/rc.conf.d/network /usr/local/etc/rc.conf.d/network


[snip]
> Of course, there is no way to ask "Where this service is enabled/disabled?”

Currently today, there is:
# sysrc -F sshd_enable
sshd_enable: /etc/rc.conf


> So we can catch $rc_conf_files, but not a bunch of rc.conf.d dirs and
> subdirs.

With the above review (D3551):
# sysrc -Fs ipfw ipfw_enable
ipfw_enable: /etc/rc.conf.d/ipfw


[snip]
> We have only sysrc(8), but it can
> only edit $rc_conf_files in safe way. There is no support for
> rc.conf.d dirs in sysrc(8).

https://reviews.freebsd.org/D3551 <https://reviews.freebsd.org/D3551>;


> And, in general, it's a tool to just `edit` $rc_conf_files, not to
> control and configure services.
> 

As mentioned previously (by Lars):
https://reviews.freebsd.org/D451 <https://reviews.freebsd.org/D451>;


[snip rest]
— 
Cheers,
Devin



help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?D1D47194-00C7-4CAA-A7DF-2F25621E1A65>