chiark / gitweb /
coredump: Support coredump.conf.d directories in the usual search paths
authorJosh Triplett <josh@joshtriplett.org>
Sat, 29 Nov 2014 09:06:48 +0000 (01:06 -0800)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 29 Nov 2014 18:55:32 +0000 (13:55 -0500)
Makefile-man.am
man/coredump.conf.xml
src/journal/coredump.c
src/journal/coredump.conf

index 593dc40..01d3408 100644 (file)
@@ -714,8 +714,10 @@ MANPAGES += \
        man/coredumpctl.1 \
        man/systemd-coredump.8
 MANPAGES_ALIAS += \
-       #
-
+       man/coredump.conf.d.5
+man/coredump.conf.d.5: man/coredump.conf.5
+man/coredump.conf.d.html: man/coredump.conf.html
+       $(html-alias)
 
 endif
 
index 5eb5c5f..37916f0 100644 (file)
@@ -22,7 +22,8 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 -->
 
-<refentry id="coredump.conf" conditional="ENABLE_COREDUMP">
+<refentry id="coredump.conf" conditional="ENABLE_COREDUMP"
+          xmlns:xi="http://www.w3.org/2001/XInclude">
   <refentryinfo>
     <title>coredump.conf</title>
     <productname>systemd</productname>
 
   <refnamediv>
     <refname>coredump.conf</refname>
-    <refpurpose>Coredump storage configuration file</refpurpose>
+    <refname>coredump.conf.d</refname>
+    <refpurpose>Coredump storage configuration files</refpurpose>
   </refnamediv>
 
   <refsynopsisdiv>
     <para><filename>/etc/systemd/coredump.conf</filename></para>
+    <para><filename>/etc/systemd/coredump.conf.d/*.conf</filename></para>
+    <para><filename>/run/systemd/coredump.conf.d/*.conf</filename></para>
+    <para><filename>/usr/lib/systemd/coredump.conf.d/*.conf</filename></para>
   </refsynopsisdiv>
 
   <refsect1>
     <title>Description</title>
 
-    <para>This file configures the behaviour of <command>systemd-coredump</command>,
+    <para>These files configure the behaviour of <command>systemd-coredump</command>,
     a handler for core dumps invoked by the kernel.</para>
   </refsect1>
 
+  <xi:include href="standard-conf.xml" xpointer="confd" />
+  <xi:include href="standard-conf.xml" xpointer="conf" />
+
   <refsect1>
     <title>Options</title>
 
index d889ed1..be45a68 100644 (file)
@@ -120,10 +120,11 @@ static int parse_config(void) {
                 {}
         };
 
-        return config_parse(NULL, "/etc/systemd/coredump.conf", NULL,
-                            "Coredump\0",
-                            config_item_table_lookup, items,
-                            false, false, true, NULL);
+        return config_parse_many("/etc/systemd/coredump.conf",
+                                 CONF_DIRS_NULSTR("systemd/coredump.conf"),
+                                 "Coredump\0",
+                                 config_item_table_lookup, items,
+                                 false, NULL);
 }
 
 static int fix_acl(int fd, uid_t uid) {
index 0cc328f..0fe9fe8 100644 (file)
@@ -5,6 +5,9 @@
 #  the Free Software Foundation; either version 2.1 of the License, or
 #  (at your option) any later version.
 #
+# You can override the directives in this file by creating files in
+# /etc/systemd/coredump.conf.d/*.conf.
+#
 # See coredump.conf(5) for details
 
 [Coredump]