From: Lucas De Marchi <lucas.de.marchi@gmail.com>
To: "Dmitry V. Levin" <ldv@altlinux.org>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>,
linux-modules <linux-modules@vger.kernel.org>,
Jan Tojnar <jtojnar@gmail.com>
Subject: Re: [PATCH 2/3] depmod: fix precedence order
Date: Tue, 19 Jan 2021 12:36:57 -0800 [thread overview]
Message-ID: <CAKi4VAL5GUSf__XzY6EeDRkno1qq62p3FAV7rRkESVakjzocHA@mail.gmail.com> (raw)
In-Reply-To: <20210119183130.GA10896@altlinux.org>
On Tue, Jan 19, 2021 at 10:35 AM Dmitry V. Levin <ldv@altlinux.org> wrote:
>
> On Tue, Jan 19, 2021 at 06:52:37AM -0800, Lucas De Marchi wrote:
> > Configuration in /etc should have higher prio than /run.
>
> Should it? Isn't the common practice nowadays to have /run override /etc?
Doesn't make much sense as /run can be derived from /usr/lib. /etc is
what the system
administrator touches and should have the final say.
Man pages from systemd agree with this logic:
<title>Configuration Directories and Precedence</title>
<para>Configuration files are read from directories in
<filename>/etc/</filename>,
<filename>/run/</filename>, <filename>/usr/local/lib/</filename>,
and <filename>/usr/lib/</filename>, in
order of precedence, as listed in the SYNOPSIS section above.
Files must have the the
<literal>.conf</literal> extension. Files in
<filename>/etc/</filename> override files with the same name
in <filename>/run/</filename>, <filename>/usr/local/lib/</filename>, and
<filename>/usr/lib/</filename>. Files in
<filename>/run/</filename> override files with the same name
under <filename>/usr/</filename>.</para>
Lucas De Marchi
>
> > Given how rarely configuration in /run is used with depmod, this is
> > likely not to cause any problems, even if it's a change in behavior.
> > ---
> > tools/depmod.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/tools/depmod.c b/tools/depmod.c
> > index 3f31cdf..8e1d9ec 100644
> > --- a/tools/depmod.c
> > +++ b/tools/depmod.c
> > @@ -51,8 +51,8 @@ static int verbose = DEFAULT_VERBOSE;
> > static const char CFG_BUILTIN_KEY[] = "built-in";
> > static const char CFG_EXTERNAL_KEY[] = "external";
> > static const char *default_cfg_paths[] = {
> > - "/run/depmod.d",
> > SYSCONFDIR "/depmod.d",
> > + "/run/depmod.d",
> > "/lib/depmod.d",
> > NULL
> > };
>
> --
> ldv
next prev parent reply other threads:[~2021-01-19 20:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-19 14:52 [PATCH 1/3] libkmod: Fix documentation on config precedence order Lucas De Marchi
2021-01-19 14:52 ` [PATCH 2/3] depmod: fix " Lucas De Marchi
2021-01-19 15:34 ` Marco d'Itri
2021-01-19 17:22 ` Lucas De Marchi
2021-01-19 18:31 ` Dmitry V. Levin
2021-01-19 20:36 ` Lucas De Marchi [this message]
2021-01-19 14:52 ` [PATCH 3/3] Support /usr/local for configuration files Lucas De Marchi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAKi4VAL5GUSf__XzY6EeDRkno1qq62p3FAV7rRkESVakjzocHA@mail.gmail.com \
--to=lucas.de.marchi@gmail.com \
--cc=jtojnar@gmail.com \
--cc=ldv@altlinux.org \
--cc=linux-modules@vger.kernel.org \
--cc=lucas.demarchi@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).