mirror of
https://github.com/home-assistant/supervisor.git
synced 2026-04-18 07:35:22 +01:00
Call Subscribe on systemd D-Bus connect to enable signals (#6659)
systemd only emits bus signals (including PropertiesChanged) when at least one client has called Subscribe() on the Manager interface. On regular HAOS systems, systemd-logind calls Subscribe which enables signals for all bus clients. However, in environments without systemd-logind (such as the Supervisor devcontainer with systemd), no signals are emitted, causing the firewall unit wait to time out. Explicitly calling Subscribe() has no downsides and makes it clear that the Supervisor relies on these signals. There is no need to call Unsubscribe() as systemd automatically tracks clients and stops emitting signals when all subscribers have disconnected from the bus. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -656,6 +656,10 @@ class Systemd(DBusServiceMock):
|
||||
def PowerOff(self) -> None:
|
||||
"""Power off host computer."""
|
||||
|
||||
@dbus_method()
|
||||
def Subscribe(self) -> None:
|
||||
"""Subscribe to systemd signals."""
|
||||
|
||||
@dbus_method()
|
||||
def StartUnit(self, name: "s", mode: "s") -> "o":
|
||||
"""Start a service unit."""
|
||||
|
||||
Reference in New Issue
Block a user