Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Jul 2023 22:11:29 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Kyle Evans <kevans@freebsd.org>
Cc:        Doug Rabson <dfr@freebsd.org>, src-committers <src-committers@freebsd.org>,  "<dev-commits-src-all@freebsd.org>" <dev-commits-src-all@freebsd.org>,  "<dev-commits-src-main@freebsd.org>" <dev-commits-src-main@freebsd.org>
Subject:   Re: git: 09267cc15284 - main - /etc/rc.subr: add support for kld sysctl variables
Message-ID:  <CANCZdfoUaqd_1kVx0EAyfY7-82KTfw%2Bq_%2B6V560mhcOXO9K5iw@mail.gmail.com>
In-Reply-To: <54f0a239-ebc3-9496-f1b2-ea8eb15f80ba@FreeBSD.org>
References:  <202307140957.36E9vXtE047194@gitrepo.freebsd.org> <54f0a239-ebc3-9496-f1b2-ea8eb15f80ba@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--0000000000002baa5706007ec39d
Content-Type: text/plain; charset="UTF-8"

On Fri, Jul 14, 2023, 9:59 PM Kyle Evans <kevans@freebsd.org> wrote:

> On 7/14/23 04:57, Doug Rabson wrote:
> > The branch main has been updated by dfr:
> >
> > URL:
> https://cgit.FreeBSD.org/src/commit/?id=09267cc15284795fef958fb9ed786bb2382d6763
> >
> > commit 09267cc15284795fef958fb9ed786bb2382d6763
> > Author:     Doug Rabson <dfr@FreeBSD.org>
> > AuthorDate: 2023-06-21 12:26:17 +0000
> > Commit:     Doug Rabson <dfr@FreeBSD.org>
> > CommitDate: 2023-07-14 09:49:47 +0000
> >
> >      /etc/rc.subr: add support for kld sysctl variables
> >
> >      For kernel modules loaded by scripts in /etc/rc.d and
> >      /usr/local/etc/rc.d, if there is a file in /etc/sysctl.conf.d named
> <kld
> >      name>.conf, then this will be loaded using the sysctl(8) utility.
> For
> >      instance, sysctl variable changes for the pf kernel module would be
> >      placed in the file /etc/sysctl.conf.d/pf.conf.
> >
> >      PR:             272129
> >      Reviewed by:    imp freebsd_igalic.co
> >      MFC after:      2 weeks
> >      Differential Revision: https://reviews.freebsd.org/D40886
>
> Hello!
>
> We discussed this out-of-band a little bit, but to circle back to the
> list: I'd like to propose changing the name of this directory before we
> cement it into a release; we've seen some non-zero amount of confusion
> with rc.conf.d (at least on IRC) because files within are actually
> conditionally sourced based on daemons being loaded. Many folks are
> conditioned to seeing $file.d as "just a way to split up $file," and
> when the contents are conditionally loaded it's not necessarily intuitive.
>
> We could document the behavior in hier(7) in additional to
> sysctl.conf(5), but IMO it'd be really nice for conditionally-sourced
> directories to be a little more descriptively named so that one could
> make an educated guess as to when the contents are used.  For this one,
> perhaps "sysctl.kld.d"?
>
> I don't really know what to propose for rc.conf.d, perhaps rc.svcconf.d,
> but we'd need to actually implement rc.conf.d as you might guess it's
> implemented if we change it since it's seen a number of releases.
>

I'm planning on adding this behavior to devmatch (and maybe moving it more
into devd), if that affects the naming.

Warner

Thanks,
>
> Kyle Evans
>

--0000000000002baa5706007ec39d
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto"><div><br><br><div class=3D"gmail_quote"><div dir=3D"ltr" =
class=3D"gmail_attr">On Fri, Jul 14, 2023, 9:59 PM Kyle Evans &lt;<a href=
=3D"mailto:kevans@freebsd.org">kevans@freebsd.org</a>&gt; wrote:<br></div><=
blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px=
 #ccc solid;padding-left:1ex">On 7/14/23 04:57, Doug Rabson wrote:<br>
&gt; The branch main has been updated by dfr:<br>
&gt; <br>
&gt; URL: <a href=3D"https://cgit.FreeBSD.org/src/commit/?id=3D09267cc15284=
795fef958fb9ed786bb2382d6763" rel=3D"noreferrer noreferrer" target=3D"_blan=
k">https://cgit.FreeBSD.org/src/commit/?id=3D09267cc15284795fef958fb9ed786b=
b2382d6763</a><br>
&gt; <br>
&gt; commit 09267cc15284795fef958fb9ed786bb2382d6763<br>
&gt; Author:=C2=A0 =C2=A0 =C2=A0Doug Rabson &lt;dfr@FreeBSD.org&gt;<br>
&gt; AuthorDate: 2023-06-21 12:26:17 +0000<br>
&gt; Commit:=C2=A0 =C2=A0 =C2=A0Doug Rabson &lt;dfr@FreeBSD.org&gt;<br>
&gt; CommitDate: 2023-07-14 09:49:47 +0000<br>
&gt; <br>
&gt;=C2=A0 =C2=A0 =C2=A0 /etc/rc.subr: add support for kld sysctl variables=
<br>
&gt;=C2=A0 =C2=A0 =C2=A0 <br>
&gt;=C2=A0 =C2=A0 =C2=A0 For kernel modules loaded by scripts in /etc/rc.d =
and<br>
&gt;=C2=A0 =C2=A0 =C2=A0 /usr/local/etc/rc.d, if there is a file in /etc/sy=
sctl.conf.d named &lt;kld<br>
&gt;=C2=A0 =C2=A0 =C2=A0 name&gt;.conf, then this will be loaded using the =
sysctl(8) utility. For<br>
&gt;=C2=A0 =C2=A0 =C2=A0 instance, sysctl variable changes for the pf kerne=
l module would be<br>
&gt;=C2=A0 =C2=A0 =C2=A0 placed in the file /etc/sysctl.conf.d/pf.conf.<br>
&gt;=C2=A0 =C2=A0 =C2=A0 <br>
&gt;=C2=A0 =C2=A0 =C2=A0 PR:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0272129<br>
&gt;=C2=A0 =C2=A0 =C2=A0 Reviewed by:=C2=A0 =C2=A0 imp <a href=3D"http://fr=
eebsd_igalic.co" rel=3D"noreferrer noreferrer" target=3D"_blank">freebsd_ig=
alic.co</a><br>
&gt;=C2=A0 =C2=A0 =C2=A0 MFC after:=C2=A0 =C2=A0 =C2=A0 2 weeks<br>
&gt;=C2=A0 =C2=A0 =C2=A0 Differential Revision: <a href=3D"https://reviews.=
freebsd.org/D40886" rel=3D"noreferrer noreferrer" target=3D"_blank">https:/=
/reviews.freebsd.org/D40886</a><br>
<br>
Hello!<br>
<br>
We discussed this out-of-band a little bit, but to circle back to the <br>
list: I&#39;d like to propose changing the name of this directory before we=
<br>
cement it into a release; we&#39;ve seen some non-zero amount of confusion =
<br>
with rc.conf.d (at least on IRC) because files within are actually <br>
conditionally sourced based on daemons being loaded. Many folks are <br>
conditioned to seeing $file.d as &quot;just a way to split up $file,&quot; =
and<br>
when the contents are conditionally loaded it&#39;s not necessarily intuiti=
ve.<br>
<br>
We could document the behavior in hier(7) in additional to <br>
sysctl.conf(5), but IMO it&#39;d be really nice for conditionally-sourced<b=
r>
directories to be a little more descriptively named so that one could<br>
make an educated guess as to when the contents are used.=C2=A0 For this one=
,<br>
perhaps &quot;sysctl.kld.d&quot;?<br>
<br>
I don&#39;t really know what to propose for rc.conf.d, perhaps rc.svcconf.d=
, <br>
but we&#39;d need to actually implement rc.conf.d as you might guess it&#39=
;s<br>
implemented if we change it since it&#39;s seen a number of releases.<br></=
blockquote></div></div><div dir=3D"auto"><br></div><div dir=3D"auto">I&#39;=
m planning on adding this behavior to devmatch (and maybe moving it more in=
to devd), if that affects the naming.</div><div dir=3D"auto"><br></div><div=
 dir=3D"auto">Warner=C2=A0</div><div dir=3D"auto"><br></div><div dir=3D"aut=
o"><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"ma=
rgin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks,<br>
<br>
Kyle Evans<br>
</blockquote></div></div></div>

--0000000000002baa5706007ec39d--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfoUaqd_1kVx0EAyfY7-82KTfw%2Bq_%2B6V560mhcOXO9K5iw>