How to control and setup service?
Pavel Timofeev
timp87 at gmail.com
Thu Sep 3 14:59:41 UTC 2015
2015-09-03 0:03 GMT+03:00 Devin Teske <dteske at panzura.com>:
>
> On Aug 27, 2015, at 6:21 AM, Pavel Timofeev <timp87 at 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
> 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
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]
> —
> Cheers,
> Devin
>
More information about the freebsd-hackers
mailing list