Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Jan 2024 23:04:28 -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:  <158D9F44-5633-4B4E-A781-834574F42F67@gmail.com>
In-Reply-To: <20240106214844.5B9DA7FE2A02@ary.qy>
References:  <20240106214844.5B9DA7FE2A02@ary.qy>

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

> On Jan 6, 2024, at 4:48 PM, John Levine <johnl@iecc.com> wrote:
>=20
> It appears that Juan Manuel Palacios <jmpalacios@gmail.com> said:
>> Hi everyone,
>>=20
>> I=E2=80=99m new on this mailing list (though not to FreeBSD proper), =
so apologies if this question has already been beaten to death, but I =
couldn=E2=80=99t find any
>> discussions on the topic anywhere. I=E2=80=99m happy to be pointed to =
existing answers if they exist, though.
>>=20
>> Basically, my question is if it=E2=80=99s possible to use something =
like /usr/local/etc/rc.conf to configure stuff like services that should =
start on system boot,
>> rather than putting that stuff in /etc/rc.conf.local (or =
/etc/rc.conf, for that matter).
>=20
> The fifth paragraph of the rc.conf(5) man page appears to answer this =
question.

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.

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:

/usr/local/etc/rc.conf.d/apache24
/usr/local/etc/rc.conf.d/php-fpm

but not a single one named:

/usr/local/etc/rc.conf

So, if that=E2=80=99s correct, why the seeming deviation from what =
appears to be the norm of /etc/foo, for base system configurations, and =
/usr/local/etc/foo, for local configurations? That can be seen, e.g., in =
pkg.conf(5), and if I=E2=80=99m not mistaken for multiple other tools. =
Why would rc(8) offer /etc/rc.conf & /etc/rc.conf.local instead?

>=20
> R's,
> John

Thanks,=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?158D9F44-5633-4B4E-A781-834574F42F67>