From 58b88a6919a016b2776e1c41a8be7243e3c39e3d Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Sat, 29 Aug 2020 11:35:15 +0200 Subject: [PATCH] Check if supervisor run priv (#1993) --- supervisor/core.py | 4 ++++ supervisor/supervisor.py | 6 ------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/supervisor/core.py b/supervisor/core.py index 5e458acd1..8943104f4 100644 --- a/supervisor/core.py +++ b/supervisor/core.py @@ -45,6 +45,10 @@ class Core(CoreSysAttributes): _LOGGER.error( "Detected Docker running inside LXC. Running Home Assistant with the Supervisor on LXC is not supported!" ) + elif not self.sys_supervisor.instance.privileged: + self.supported = False + self.healthy = False + _LOGGER.error("Supervisor does not run in Privileged mode.") if self.sys_docker.info.check_requirements(): self.supported = False diff --git a/supervisor/supervisor.py b/supervisor/supervisor.py index 5401f065a..9fdd58b49 100644 --- a/supervisor/supervisor.py +++ b/supervisor/supervisor.py @@ -41,12 +41,6 @@ class Supervisor(CoreSysAttributes): with suppress(DockerAPIError): await self.instance.cleanup() - # Check privileged mode - if not self.instance.privileged: - _LOGGER.error( - "Supervisor does not run in Privileged mode. Hassio runs with limited functionality!" - ) - @property def ip_address(self) -> IPv4Address: """Return IP of Supervisor instance."""