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 <<a href= =3D"mailto:kevans@freebsd.org">kevans@freebsd.org</a>> 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> > The branch main has been updated by dfr:<br> > <br> > 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> > <br> > commit 09267cc15284795fef958fb9ed786bb2382d6763<br> > Author:=C2=A0 =C2=A0 =C2=A0Doug Rabson <dfr@FreeBSD.org><br> > AuthorDate: 2023-06-21 12:26:17 +0000<br> > Commit:=C2=A0 =C2=A0 =C2=A0Doug Rabson <dfr@FreeBSD.org><br> > CommitDate: 2023-07-14 09:49:47 +0000<br> > <br> >=C2=A0 =C2=A0 =C2=A0 /etc/rc.subr: add support for kld sysctl variables= <br> >=C2=A0 =C2=A0 =C2=A0 <br> >=C2=A0 =C2=A0 =C2=A0 For kernel modules loaded by scripts in /etc/rc.d = and<br> >=C2=A0 =C2=A0 =C2=A0 /usr/local/etc/rc.d, if there is a file in /etc/sy= sctl.conf.d named <kld<br> >=C2=A0 =C2=A0 =C2=A0 name>.conf, then this will be loaded using the = sysctl(8) utility. For<br> >=C2=A0 =C2=A0 =C2=A0 instance, sysctl variable changes for the pf kerne= l module would be<br> >=C2=A0 =C2=A0 =C2=A0 placed in the file /etc/sysctl.conf.d/pf.conf.<br> >=C2=A0 =C2=A0 =C2=A0 <br> >=C2=A0 =C2=A0 =C2=A0 PR:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0272129<br> >=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> >=C2=A0 =C2=A0 =C2=A0 MFC after:=C2=A0 =C2=A0 =C2=A0 2 weeks<br> >=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'd like to propose changing the name of this directory before we= <br> cement it into a release; we'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 "just a way to split up $file," = and<br> when the contents are conditionally loaded it'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'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 "sysctl.kld.d"?<br> <br> I don't really know what to propose for rc.conf.d, perhaps rc.svcconf.d= , <br> but we'd need to actually implement rc.conf.d as you might guess it'= ;s<br> implemented if we change it since it's seen a number of releases.<br></= blockquote></div></div><div dir=3D"auto"><br></div><div dir=3D"auto">I'= 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>