Date: Sat, 27 Jan 2024 15:56:08 -0500 From: Juan Manuel Palacios <jmpalacios@gmail.com> To: John Levine <johnl@iecc.com> Cc: freebsd-questions@freebsd.org Subject: Re: Moving /etc/rc.conf.local to /usr/local/etc/rc.conf Message-ID: <BE60F62F-CBF8-4C05-BF2D-6DECB753EAC4@gmail.com> In-Reply-To: <73678f67-e49f-365a-da09-5575619d736b@iecc.com> References: <20240106214844.5B9DA7FE2A02@ary.qy> <158D9F44-5633-4B4E-A781-834574F42F67@gmail.com> <73678f67-e49f-365a-da09-5575619d736b@iecc.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi John, Sorry for the long delay in following up on this thread. I=E2=80=99ve read through the man page and /etc/defaults/rc.conf, and I = still can=E2=80=99t figure out how to make rc(8) work with a = /usr/local/etc/rc.conf file fully out-of-the-box. I did manage to = configure each individual service that I want to start and customize = through individual /usr/local/etc/rc.conf.d/$name configuration files, = which is great, it does accomplish the goal I had of moving as many jail = configurations as possible to /usr/local/etc; but, provided I=E2=80=99m = reading things right, and /usr/local/etc/rc.conf is indeed not supported = out-of-the-box, I wonder what the rationale for that would be, i.e. why = support out-of-the-box /etc/rc.conf & /etc/rc.conf.local, rather than = /etc/rc.conf & /usr/local/etc/rc.conf, which seems to be the FreeBSD = standard used for almost everything else (e.g. /etc/pkg.conf & = /usr/local/etc/pkg.conf for the pkg tool). I know you can customize the rc_conf_files variable to hold a value with = my files of choice, but that in itself implies customizing /etc/rc.conf = to override rc_conf_files=E2=80=99 default value, which defeats the = purpose of keeping all customizations to /usr/local/etc. Thank you, > On Jan 6, 2024, at 11:10 PM, John R. Levine <johnl@iecc.com> wrote: >=20 >> Thank you for pointing out that entry in the rc.conf(5) man page! I = guess I either didn=E2=80=99t pay too much attention to it at first, = and/or I was thrown off either by the meaning of =E2=80=9C(dir)=E2=80=9D = in that paragraph, which I can only assume maps to /usr/local/etc (but I = still haven=E2=80=99t tested to confirm that), or by the fact that you = can only use =E2=80=9C(name)=E2=80=9D configuration files inside = rc.conf.d within =E2=80=9C(dir)=E2=80=9D, rather than just a plain = rc.conf file within =E2=80=9C(dir)=E2=80=9D. >>=20 >> So, if I=E2=80=99m I=E2=80=99m understanding correctly, that=E2=80=99d = mean that I can have configuration files (*NOT* script files, which = would go inside =E2=80=9C(dir)=E2=80=9D/rc.d) such as: >>=20 >> /usr/local/etc/rc.conf.d/apache24 >> /usr/local/etc/rc.conf.d/php-fpm >=20 > Sure. >=20 >> but not a single one named: >>=20 >> /usr/local/etc/rc.conf >=20 > Um, if you'd read to the end of that paragraph, you'd have found = rc_conf_files which lists individual files to include. >=20 > These are just files of shell commands that are included by the = startup scripts. Take a look at /etc/defaults/rc.conf (described in the = third paragraph of that same man page) and see what it does. >=20 > Regards, > John Levine, johnl@taugh.com, Primary Perpetrator of "The Internet for = Dummies", > Please consider the environment before reading this e-mail. = https://jl.ly
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BE60F62F-CBF8-4C05-BF2D-6DECB753EAC4>