install: detect masked unit with drop-ins
authorFilipe Brandenburger <filbranden@google.com>
Fri, 2 Mar 2018 01:48:15 +0000 (17:48 -0800)
committerFilipe Brandenburger <filbranden@google.com>
Fri, 2 Mar 2018 05:11:35 +0000 (21:11 -0800)
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

index 01e2ebf..fb2231b 100644 (file)
@@ -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");