3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 21:22:37 +01:00

auto-t: add storage dir to IWD() constructor

Add support for setting a custom storage directory.
This commit is contained in:
James Prestwood 2020-12-10 09:45:20 -08:00 committed by Denis Kenzior
parent 41b8a32dfc
commit b18f843532

View File

@ -943,7 +943,8 @@ class IWD(AsyncOpAbstract):
_default_instance = None _default_instance = None
psk_agent = None psk_agent = None
def __init__(self, start_iwd_daemon = False, iwd_config_dir = '/tmp', namespace=ctx): def __init__(self, start_iwd_daemon = False, iwd_config_dir = '/tmp',
iwd_storage_dir = '/tmp/iwd', namespace=ctx):
self.namespace = namespace self.namespace = namespace
self._bus = namespace.get_bus() self._bus = namespace.get_bus()
@ -951,7 +952,8 @@ class IWD(AsyncOpAbstract):
if self.namespace.is_process_running('iwd'): if self.namespace.is_process_running('iwd'):
raise Exception("IWD requested to start but is already running") raise Exception("IWD requested to start but is already running")
self._iwd_proc = self.namespace.start_iwd(iwd_config_dir) self._iwd_proc = self.namespace.start_iwd(iwd_config_dir,
iwd_storage_dir)
tries = 0 tries = 0
while not self._bus.name_has_owner(IWD_SERVICE): while not self._bus.name_has_owner(IWD_SERVICE):