[oe-commits] [openembedded-core] 12/32: systemd-systemctl: Fix handling of aliased targets

git at git.openembedded.org git at git.openembedded.org
Sun Dec 15 22:48:59 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 0030f3a822dae7659b603e324a39b9760f54a7d0
Author: Slavic Brutalik <no at good.com>
AuthorDate: Fri Dec 13 00:30:54 2019 +0200

    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 at gmail.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/recipes-core/systemd/systemd-systemctl/systemctl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/systemd/systemd-systemctl/systemctl b/meta/recipes-core/systemd/systemd-systemctl/systemctl
index ebac863..990de1a 100755
--- a/meta/recipes-core/systemd/systemd-systemctl/systemctl
+++ b/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)

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list