mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-19 07:06:30 +00:00
Add dbus support to plugin-dns (#3459)
This commit is contained in:
parent
c17006cc37
commit
8683d46ab6
@ -45,7 +45,7 @@ from ..hardware.data import Device
|
||||
from ..jobs.decorator import Job, JobCondition
|
||||
from ..resolution.const import ContextType, IssueType, SuggestionType
|
||||
from ..utils import process_lock
|
||||
from .const import Capabilities
|
||||
from .const import DBUS_PATH, DBUS_VOLUME, Capabilities
|
||||
from .interface import DockerInterface
|
||||
|
||||
if TYPE_CHECKING:
|
||||
@ -409,7 +409,7 @@ class DockerAddon(DockerInterface):
|
||||
|
||||
# Host D-Bus system
|
||||
if self.addon.host_dbus:
|
||||
volumes.update({"/run/dbus": {"bind": "/run/dbus", "mode": "ro"}})
|
||||
volumes.update({DBUS_PATH: DBUS_VOLUME})
|
||||
|
||||
# Configuration Audio
|
||||
if self.addon.with_audio:
|
||||
|
@ -15,3 +15,7 @@ class Capabilities(str, Enum):
|
||||
SYS_RAWIO = "SYS_RAWIO"
|
||||
SYS_RESOURCE = "SYS_RESOURCE"
|
||||
SYS_TIME = "SYS_TIME"
|
||||
|
||||
|
||||
DBUS_PATH = "/run/dbus"
|
||||
DBUS_VOLUME = {"bind": DBUS_PATH, "mode": "ro"}
|
||||
|
@ -3,6 +3,7 @@ import logging
|
||||
|
||||
from ..const import ENV_TIME
|
||||
from ..coresys import CoreSysAttributes
|
||||
from .const import DBUS_PATH, DBUS_VOLUME
|
||||
from .interface import DockerInterface
|
||||
|
||||
_LOGGER: logging.Logger = logging.getLogger(__name__)
|
||||
@ -47,7 +48,8 @@ class DockerDNS(DockerInterface, CoreSysAttributes):
|
||||
security_opt=self.security_opt,
|
||||
environment={ENV_TIME: self.sys_timezone},
|
||||
volumes={
|
||||
str(self.sys_config.path_extern_dns): {"bind": "/config", "mode": "rw"}
|
||||
str(self.sys_config.path_extern_dns): {"bind": "/config", "mode": "rw"},
|
||||
DBUS_PATH: DBUS_VOLUME,
|
||||
},
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user