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>

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

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

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


[snip]
>=20
> 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!
>=20

D=E2=80=99Oh, didn=E2=80=99t realize that rc.conf.d/$name could be a =
directory.
Looks like I=E2=80=99ll 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?=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 <https://reviews.freebsd.org/D3551>;


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

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


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




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