From: Mike Yuan Date: Wed, 22 Nov 2023 11:04:29 +0000 (+0800) Subject: conf-parser: only read the first found main config file X-Git-Tag: v255-rc3~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0ca66adfcc47c34b61331ea1cdea90435f9f92f1;p=thirdparty%2Fsystemd.git conf-parser: only read the first found main config file Follow-up for 93f1da45566d064f4f053b37bbac2813631f58b1 and 8ea288db018c7dfe0016d51d4538539bab4ab6de Before the offending commits, we only read the first found main config file. If the main config file is symlinked to/as a drop-in, we should break instead of continuing, for it to be read later. --- diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c index 12312f55008..59a529d4bcb 100644 --- a/src/shared/conf-parser.c +++ b/src/shared/conf-parser.c @@ -557,7 +557,7 @@ static int config_parse_many_files( if (set_contains(inodes, &st)) { log_debug("%s: symlink to/symlinked as drop-in, will be read later.", *fn); - continue; + break; } } @@ -571,6 +571,8 @@ static int config_parse_many_files( if (r < 0) return r; } + + break; } /* Then read all the drop-ins. */