diff mbox series

systemd-systemctl: Add support for UpheldBy fields in [Install] section

Message ID 20260625-systemctl-upheldby-v1-1-b66839cab56b@bruker.com
State New
Headers show
Series systemd-systemctl: Add support for UpheldBy fields in [Install] section | expand

Commit Message

Torben Hohn via B4 Relay June 25, 2026, 3:59 p.m. UTC
From: Torben Hohn <torben.hohn@bruker.com>

UpheldBy generates *.upholds links in the same way WantedBy generates
*.wants links, when systemctl enable is executed. This feature is needed
to have a service restart, when a dependency restarts, and
the service is stopped via BindsTo= for example.

Call self._process_deps() with appropriate parameters to support UpheldBy.

Signed-off-by: Torben Hohn <torben.hohn@bruker.com>
---
 meta/recipes-core/systemd/systemd-systemctl/systemctl | 1 +
 1 file changed, 1 insertion(+)


---
base-commit: 78626a6f1861361bbd78a411cb27b093e34b466b
change-id: 20260625-systemctl-upheldby-83526607c5d2

Best regards,
diff mbox series

Patch

diff --git a/meta/recipes-core/systemd/systemd-systemctl/systemctl b/meta/recipes-core/systemd/systemd-systemctl/systemctl
index 2229bc7b6d26c757414715341ff79d8a76034c8d..0171d2fca639ed452af9295c6a3cfd3c7102f67c 100755
--- a/meta/recipes-core/systemd/systemd-systemctl/systemctl
+++ b/meta/recipes-core/systemd/systemd-systemctl/systemctl
@@ -244,6 +244,7 @@  class SystemdUnit():
 
         self._process_deps(config, service, path, 'WantedBy', 'wants', instance)
         self._process_deps(config, service, path, 'RequiredBy', 'requires', instance)
+        self._process_deps(config, service, path, 'UpheldBy', 'upholds', instance)
 
         try:
             for also in config.get('Install', 'Also'):