From 1b907b5c3b11491b790e541dd24255a758511a2f Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Sat, 29 Nov 2014 01:06:04 -0800 Subject: core: Support system.conf.d and user.conf.d directories in the usual search paths --- src/core/main.c | 9 ++++----- src/core/system.conf | 3 +++ src/core/user.conf | 3 +++ 3 files changed, 10 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/core/main.c b/src/core/main.c index c9fd56232c..140f2195ac 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -667,13 +667,12 @@ static int parse_config_file(void) { {} }; - const char *fn; + const char *fn, *conf_dirs_nulstr; fn = arg_running_as == SYSTEMD_SYSTEM ? PKGSYSCONFDIR "/system.conf" : PKGSYSCONFDIR "/user.conf"; - config_parse(NULL, fn, NULL, - "Manager\0", - config_item_table_lookup, items, - false, false, true, NULL); + conf_dirs_nulstr = arg_running_as == SYSTEMD_SYSTEM ? CONF_DIRS_NULSTR("systemd/system.conf") : CONF_DIRS_NULSTR("systemd/user.conf"); + config_parse_many(fn, conf_dirs_nulstr, "Manager\0", + config_item_table_lookup, items, false, NULL); return 0; } diff --git a/src/core/system.conf b/src/core/system.conf index 65a35a0689..a3727200df 100644 --- a/src/core/system.conf +++ b/src/core/system.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/system.conf.d/*.conf. +# # See systemd-system.conf(5) for details [Manager] diff --git a/src/core/user.conf b/src/core/user.conf index 8c7ecde727..87c8164378 100644 --- a/src/core/user.conf +++ b/src/core/user.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/user.conf.d/*.conf. +# # See systemd-user.conf(5) for details [Manager] -- cgit v1.2.3-54-g00ecf