From 396f9e2b327d702ea9502b80febf836283e19350 Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Sat, 29 Nov 2014 01:06:41 -0800 Subject: bootchart: Support bootchart.conf.d directories in the usual search paths --- Makefile-man.am | 6 ++++-- man/bootchart.conf.xml | 21 +++++++++++++++------ src/bootchart/bootchart.c | 7 +++---- src/bootchart/bootchart.conf | 3 +++ 4 files changed, 25 insertions(+), 12 deletions(-) diff --git a/Makefile-man.am b/Makefile-man.am index 2a0d73e05..593dc4063 100644 --- a/Makefile-man.am +++ b/Makefile-man.am @@ -701,8 +701,10 @@ MANPAGES += \ man/bootchart.conf.5 \ man/systemd-bootchart.1 MANPAGES_ALIAS += \ - # - + man/bootchart.conf.d.5 +man/bootchart.conf.d.5: man/bootchart.conf.5 +man/bootchart.conf.d.html: man/bootchart.conf.html + $(html-alias) endif diff --git a/man/bootchart.conf.xml b/man/bootchart.conf.xml index 68834c73b..a364826bb 100644 --- a/man/bootchart.conf.xml +++ b/man/bootchart.conf.xml @@ -25,7 +25,8 @@ along with systemd; If not, see . --> - + bootchart.conf systemd @@ -47,23 +48,31 @@ bootchart.conf - Boot performance analysis graphing tool configuration file + bootchart.conf.d + Boot performance analysis graphing tool configuration files /etc/systemd/bootchart.conf + /etc/systemd/bootchart.conf.d/*.conf + /run/systemd/bootchart.conf.d/*.conf + /usr/lib/systemd/bootchart.conf.d/*.conf Description When starting, systemd-bootchart will read the - configuration file bootchart.conf. - This configuration file determines logging parameters and - graph output. - + configuration file + /etc/systemd/bootchart.conf, followed by + the files in the bootchart.conf.d + directories. These configuration files determine logging + parameters and graph output. + + + Options diff --git a/src/bootchart/bootchart.c b/src/bootchart/bootchart.c index 5bb4247c8..0808ba44e 100644 --- a/src/bootchart/bootchart.c +++ b/src/bootchart/bootchart.c @@ -125,10 +125,9 @@ static void parse_conf(void) { { NULL, NULL, NULL, 0, NULL } }; - config_parse(NULL, BOOTCHART_CONF, NULL, - NULL, - config_item_table_lookup, items, - true, false, true, NULL); + config_parse_many(BOOTCHART_CONF, + CONF_DIRS_NULSTR("systemd/bootchart.conf"), + NULL, config_item_table_lookup, items, true, NULL); if (init != NULL) strscpy(arg_init_path, sizeof(arg_init_path), init); diff --git a/src/bootchart/bootchart.conf b/src/bootchart/bootchart.conf index d7e0dabe0..c73328fde 100644 --- a/src/bootchart/bootchart.conf +++ b/src/bootchart/bootchart.conf @@ -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/bootchart.conf.d/*.conf. +# # See bootchart.conf(5) for details [Bootchart] -- cgit v1.2.3