Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Sep 2015 17:59:39 +0300
From:      Pavel Timofeev <timp87@gmail.com>
To:        Devin Teske <dteske@panzura.com>
Cc:        freebsd-hackers@freebsd.org, Devin Teske <dteske@freebsd.org>
Subject:   Re: How to control and setup service?
Message-ID:  <CAAoTqfvzoiE-j6sfW70CRf8Fsc3FefQLDjeTDMn0R7-wP3EmMQ@mail.gmail.com>
In-Reply-To: <D1D47194-00C7-4CAA-A7DF-2F25621E1A65@panzura.com>
References:  <CAAoTqfvxUznJp%2BtguAaYQ=5HfKXTG%2BGxY644wvqm4e9=E8WuHw@mail.gmail.com> <D1D47194-00C7-4CAA-A7DF-2F25621E1A65@panzura.com>

next in thread | previous in thread | raw e-mail | index | archive | help
2015-09-03 0:03 GMT+03:00 Devin Teske <dteske@panzura.com>:
>
> 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=E2=80=99s 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=E2=80=99Oh, didn=E2=80=99t realize that rc.conf.d/$name could be a dire=
ctory.
> Looks like I=E2=80=99ll have to update the following:
>
> 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?=E2=80=9D.
>
>
> 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=
?=E2=80=9D
>
>
> 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


Thanks a lot, Devin!


>
>
> 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
>

It doesn't take into consideration a lot of things now :(

>
> [snip rest]
> =E2=80=94
> Cheers,
> Devin
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAAoTqfvzoiE-j6sfW70CRf8Fsc3FefQLDjeTDMn0R7-wP3EmMQ>