Date: Sat, 27 Jan 2024 18:26:31 -0500 From: Juan Manuel Palacios <jmpalacios@gmail.com> To: Lowell Gilbert <freebsd-questions-local@be-well.ilk.org> Cc: John Levine <johnl@iecc.com>, freebsd-questions@freebsd.org Subject: Re: Moving /etc/rc.conf.local to /usr/local/etc/rc.conf Message-ID: <E317CB4B-F698-4E55-A88E-6CDA1558C793@gmail.com> In-Reply-To: <44v87egz3b.fsf@be-well.ilk.org> References: <20240106214844.5B9DA7FE2A02@ary.qy> <158D9F44-5633-4B4E-A781-834574F42F67@gmail.com> <73678f67-e49f-365a-da09-5575619d736b@iecc.com> <BE60F62F-CBF8-4C05-BF2D-6DECB753EAC4@gmail.com> <44v87egz3b.fsf@be-well.ilk.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> On Jan 27, 2024, at 6:01=E2=80=AFPM, Lowell Gilbert = <freebsd-questions-local@be-well.ilk.org> wrote: >=20 > Juan Manuel Palacios <jmpalacios@gmail.com> writes: >=20 > For most people, it doesn't defeat that purpose. Keeping /etc the same > on all your machines is something plenty of people want to do, but > not putting anything into /etc/rc.conf is not by any means the only = (or > even the obvious) way to do that. My use case here is automating the creation of a number of = purpose-specific jails, and keeping all configurations to = /usr/local/etc, which I mount into them, so as to simplify the = provisioning, setup, and future migration processes as much as possible. = If I have to modify /etc/rc.conf to get a fully functional jail, though, = then the setup becomes a bit more complex, though admittedly in a far = from insurmountable way. With that in context, my original question about out-of-the-box support = for /usr/local/etc/rc.conf came mostly out of confusion, as I can see = the pattern of supporting /etc/foo & /usr/local/etc/foo in multiple = places, e.g. pkg (as already referenced), but for rc(8) it=E2=80=99s = /etc/foo & /etc/foo.local, and I couldn=E2=80=99t understand why, = leading me to believe there was something I was either misunderstanding, = or not finding in the documentation. Hence my initiative to submit a = merge request to support /usr/local/etc/rc.conf out-of-the-box, even if = only for consistency=E2=80=99s sake. >=20 > It's quite common to have a shared /etc, but very uncommon to need = that > to be limited to what an unscripted install would put in out of the > box. If you want this because you're applying a common template to > install a lot of machines, there is a common approach of scripting the > install to add the extra variable (or more) to /etc/rc.conf; they will > be customized, but they will all be customized in the same automated > way. You just change them all to have /usr/local/etc/rc.conf (your > choice of filename) included in ${rc_conf_files}. In my current scripting I point sysrc(8) to = /usr/local/etc/rc.conf.d/$name for each service(8) customization I need. = Customizing rc_conf_files in /etc/rc.conf and then using a single = /usr/local/etc/rc.conf for all of my service(8) needs would also be a = functional alternative, for sure. >=20 > That said, I don't see any reason that /etc/defaults/rc.conf couldn't > be modified in the official build to include a file in /usr/local into > ${rc_conf_files} if said file exists. Make sure the filename isn't > likely to conflict with anything other people have already used, but > aside from that I don't see any downsides. I=E2=80=99d think /usr/local/etc/rc.conf would by very far be the = preferred choice for out-of-the-box support. When I first get a chance = I=E2=80=99ll start a bit of a more formal inquiry into that. >=20 > Be well. Regards,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E317CB4B-F698-4E55-A88E-6CDA1558C793>