mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-23 17:16:33 +00:00
Mark system without using NetworkManager as unsupported (#2114)
* Mark system without using NetworkManager as unsupported * Use feature style * fix code
This commit is contained in:
parent
cb751e0397
commit
4c525de5e2
@ -12,6 +12,7 @@ from .const import (
|
|||||||
SUPERVISED_SUPPORTED_OS,
|
SUPERVISED_SUPPORTED_OS,
|
||||||
AddonStartup,
|
AddonStartup,
|
||||||
CoreState,
|
CoreState,
|
||||||
|
HostFeature,
|
||||||
)
|
)
|
||||||
from .coresys import CoreSys, CoreSysAttributes
|
from .coresys import CoreSys, CoreSysAttributes
|
||||||
from .exceptions import (
|
from .exceptions import (
|
||||||
@ -161,16 +162,21 @@ class Core(CoreSysAttributes):
|
|||||||
self.sys_host.info.operating_system,
|
self.sys_host.info.operating_system,
|
||||||
)
|
)
|
||||||
|
|
||||||
# Check all DBUS connectivity
|
# Check Host features
|
||||||
if not self.sys_dbus.hostname.is_connected:
|
if HostFeature.NETWORK not in self.sys_host.supported_features:
|
||||||
self.supported = False
|
self.supported = False
|
||||||
_LOGGER.error("Hostname DBUS is not connected")
|
_LOGGER.error("NetworkManager is not correct working")
|
||||||
if not self.sys_dbus.network.is_connected:
|
if any(
|
||||||
|
feature not in self.sys_host.supported_features
|
||||||
|
for feature in (
|
||||||
|
HostFeature.HOSTNAME,
|
||||||
|
HostFeature.SERVICES,
|
||||||
|
HostFeature.SHUTDOWN,
|
||||||
|
HostFeature.REBOOT,
|
||||||
|
)
|
||||||
|
):
|
||||||
self.supported = False
|
self.supported = False
|
||||||
_LOGGER.error("NetworkManager is not connected")
|
_LOGGER.error("Systemd is not correct working")
|
||||||
if not self.sys_dbus.systemd.is_connected:
|
|
||||||
self.supported = False
|
|
||||||
_LOGGER.error("Systemd DBUS is not connected")
|
|
||||||
|
|
||||||
# Check if image names from denylist exist
|
# Check if image names from denylist exist
|
||||||
try:
|
try:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user