From e6627f2392cde12e21c40a7cfa96578c648c1f33 Mon Sep 17 00:00:00 2001 From: "Greg \"GothAck\" Miell" Date: Fri, 27 Dec 2019 14:49:51 +0000 Subject: [PATCH] unit drop-in: Fix ordering of special type.d drop-ins --- src/shared/dropin.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/shared/dropin.c b/src/shared/dropin.c index 96cd08aab25..6844c2b647b 100644 --- a/src/shared/dropin.c +++ b/src/shared/dropin.c @@ -236,6 +236,10 @@ int unit_file_find_dropin_paths( assert(ret); + SET_FOREACH(name, names, i) + STRV_FOREACH(p, lookup_path) + (void) unit_file_find_dirs(original_root, unit_path_cache, *p, name, dir_suffix, &dirs); + /* All the names in the unit are of the same type so just grab one. */ name = (char*) set_first(names); if (name) { @@ -247,7 +251,7 @@ int unit_file_find_dropin_paths( "Failed to to derive unit type from unit name: %s", name); - /* Special top level drop in for ".". Add this first as it's the most generic + /* Special top level drop in for ".". Add this last as it's the most generic * and should be able to be overridden by more specific drop-ins. */ STRV_FOREACH(p, lookup_path) (void) unit_file_find_dirs(original_root, @@ -258,10 +262,6 @@ int unit_file_find_dropin_paths( &dirs); } - SET_FOREACH(name, names, i) - STRV_FOREACH(p, lookup_path) - (void) unit_file_find_dirs(original_root, unit_path_cache, *p, name, dir_suffix, &dirs); - if (strv_isempty(dirs)) { *ret = NULL; return 0; -- 2.47.3