unit-file: support UpheldBy= in [Install] settings (adding Upholds= deps

from .upholds/)

Closes #26896
This commit is contained in:
Mike Yuan
2023-05-15 15:04:38 +08:00
parent 62281c78bb
commit 38f901791f
8 changed files with 55 additions and 33 deletions
+3 -2
View File
@@ -250,9 +250,10 @@ bool lookup_paths_timestamp_hash_same(const LookupPaths *lp, uint64_t timestamp_
static int directory_name_is_valid(const char *name) {
/* Accept a directory whose name is a valid unit file name ending in .wants/, .requires/ or .d/ */
/* Accept a directory whose name is a valid unit file name ending in .wants/, .requires/,
* .upholds/ or .d/ */
FOREACH_STRING(suffix, ".wants", ".requires", ".d") {
FOREACH_STRING(suffix, ".wants", ".requires", ".upholds", ".d") {
_cleanup_free_ char *chopped = NULL;
const char *e;