From 9639b1752cf97eeee93d2a3dbc8531d6d4d4bc2e Mon Sep 17 00:00:00 2001 From: Filipe Brandenburger Date: Thu, 1 Mar 2018 17:48:15 -0800 Subject: [PATCH] install: detect masked unit with drop-ins Before this fix, a unit with drop-ins will not be reported as masked by `systemctl is-enabled` or `systemctl list-unit-files`. --- src/shared/install.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/shared/install.c b/src/shared/install.c index 01e2ebf672a..fb2231b9955 100644 --- a/src/shared/install.c +++ b/src/shared/install.c @@ -1461,6 +1461,9 @@ static int unit_file_search( return -ENOENT; } + if (info->type == UNIT_FILE_TYPE_MASKED) + return result; + /* Search for drop-in directories */ dropin_dir_name = strjoina(info->name, ".d"); -- 2.39.2