Browse Source

systemd-systemctl: Fix handling of aliased targets

The script scans for services, parses them and makes sure those targets are still
there. The exists file check fails if the target is an alias, such as default.target
so add an additional test.

[YOCTO #13685]

Signed-off-by: Werner Grift <sky.captin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Slavic Brutalik 4 years ago
parent
commit
10bdbf033e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      meta/recipes-core/systemd/systemd-systemctl/systemctl

+ 1 - 1
meta/recipes-core/systemd/systemd-systemctl/systemctl

@@ -172,7 +172,7 @@ class SystemdUnit():
     def _path_for_unit(self, unit):
         for location in locations:
             path = self.root / location / "system" / unit
-            if path.exists():
+            if path.exists() or path.is_symlink():
                 return path
 
         raise SystemdUnitNotFoundError(self.root, unit)