feat(dbus): Update systemd unit state check to include 'activating'
Previously, the check only considered 'active' as a valid ActiveState. This update ensures the system also accounts for units in the 'activating' state, improving compatibility with transitional states in systemd services. Signed-off-by: Sven Sager <s.sager@kunbus.com>
This commit is contained in:
1 parent
9ec1e04d2b
commit
66046b6a9d
1 file changed
+4
-1
@@ -100,7 +100,10 @@ def simple_systemd(action: ServiceActions, unit: str, unmask: bool = False) -> O
|
||||
log.warning(f"could not get systemd unit {unit}")
|
||||
return False
|
||||
|
||||
return properties.UnitFileState == "enabled" and properties.ActiveState == "active"
|
||||
return properties.UnitFileState == "enabled" and properties.ActiveState in (
|
||||
"active",
|
||||
"activating",
|
||||
)
|
||||
|
||||
elif action is ServiceActions.AVAILABLE:
|
||||
try:
|
||||
|
||||
Reference in new issue
Block a user