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:
@@ -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