mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-03-06 12:58:22 +03:00
journal: make namespace invocation also support drop-in config
This commit is contained in:
parent
e6283cbf48
commit
005c7b1d88
@ -28,6 +28,9 @@
|
|||||||
<para><filename>/run/systemd/journald.conf.d/*.conf</filename></para>
|
<para><filename>/run/systemd/journald.conf.d/*.conf</filename></para>
|
||||||
<para><filename>/usr/lib/systemd/journald.conf.d/*.conf</filename></para>
|
<para><filename>/usr/lib/systemd/journald.conf.d/*.conf</filename></para>
|
||||||
<para><filename>/etc/systemd/journald@<replaceable>NAMESPACE</replaceable>.conf</filename></para>
|
<para><filename>/etc/systemd/journald@<replaceable>NAMESPACE</replaceable>.conf</filename></para>
|
||||||
|
<para><filename>/etc/systemd/journald@<replaceable>NAMESPACE</replaceable>.conf.d/*.conf</filename></para>
|
||||||
|
<para><filename>/run/systemd/journald@<replaceable>NAMESPACE</replaceable>.conf.d/*.conf</filename></para>
|
||||||
|
<para><filename>/usr/lib/systemd/journald@<replaceable>NAMESPACE</replaceable>.conf.d/*.conf</filename></para>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
@ -41,8 +44,9 @@
|
|||||||
|
|
||||||
<para>The <command>systemd-journald</command> instance managing the default namespace is configured by
|
<para>The <command>systemd-journald</command> instance managing the default namespace is configured by
|
||||||
<filename>/etc/systemd/journald.conf</filename> and associated drop-ins. Instances managing other
|
<filename>/etc/systemd/journald.conf</filename> and associated drop-ins. Instances managing other
|
||||||
namespaces read <filename>/etc/systemd/journald@<replaceable>NAMESPACE</replaceable>.conf</filename> with
|
namespaces read <filename>/etc/systemd/journald@<replaceable>NAMESPACE</replaceable>.conf</filename>
|
||||||
the namespace identifier filled in. This allows each namespace to carry a distinct configuration. See
|
and associated drop-ins with the namespace identifier filled in. This allows each namespace to carry
|
||||||
|
a distinct configuration. See
|
||||||
<citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
||||||
for details about journal namespaces.</para>
|
for details about journal namespaces.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
@ -1625,17 +1625,19 @@ static int server_parse_config_file(Server *s) {
|
|||||||
assert(s);
|
assert(s);
|
||||||
|
|
||||||
if (s->namespace) {
|
if (s->namespace) {
|
||||||
const char *namespaced;
|
const char *namespaced, *dropin_dirname;
|
||||||
|
|
||||||
/* If we are running in namespace mode, load the namespace specific configuration file, and nothing else */
|
/* If we are running in namespace mode, load the namespace specific configuration file, and nothing else */
|
||||||
namespaced = strjoina(PKGSYSCONFDIR "/journald@", s->namespace, ".conf");
|
namespaced = strjoina(PKGSYSCONFDIR "/journald@", s->namespace, ".conf");
|
||||||
|
dropin_dirname = strjoina("journald@", s->namespace, ".conf.d");
|
||||||
|
|
||||||
r = config_parse(NULL,
|
r = config_parse_many(
|
||||||
namespaced, NULL,
|
STRV_MAKE_CONST(namespaced),
|
||||||
"Journal\0",
|
(const char* const*) CONF_PATHS_STRV("systemd"),
|
||||||
config_item_perf_lookup, journald_gperf_lookup,
|
dropin_dirname,
|
||||||
CONFIG_PARSE_WARN, s,
|
"Journal\0",
|
||||||
NULL);
|
config_item_perf_lookup, journald_gperf_lookup,
|
||||||
|
CONFIG_PARSE_WARN, s, NULL);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user