mirror of
https://git.disroot.org/pranav/pybatmesh.git
synced 2025-01-09 16:27:53 +05:30
temporary hack to fix #19
Probably s/temporary/permanent/ if someone doesn't take over this "project" soon.
This commit is contained in:
parent
87612fac2c
commit
5bde1faeba
@ -35,4 +35,4 @@ See README.md for documentation.
|
|||||||
#
|
#
|
||||||
# In case you forgot to change the version, skip the number
|
# In case you forgot to change the version, skip the number
|
||||||
# and put the next number in the next commit.
|
# and put the next number in the next commit.
|
||||||
__version__ = "0.4.0a5.dev4"
|
__version__ = "0.4.0a5.dev5"
|
||||||
|
@ -71,7 +71,18 @@ class NetworkD:
|
|||||||
|
|
||||||
def delete_interface(self, name: str) -> None:
|
def delete_interface(self, name: str) -> None:
|
||||||
"""delete the given interface"""
|
"""delete the given interface"""
|
||||||
|
# If anyone knows a better way of doing this, create
|
||||||
|
# an issue and get things done
|
||||||
subprocess.run(["networkctl", "delete", name], check=True)
|
subprocess.run(["networkctl", "delete", name], check=True)
|
||||||
|
# This is probably not required. This is mainly to shut up
|
||||||
|
# pylint's messages
|
||||||
|
self.reload()
|
||||||
|
|
||||||
|
def disable_config(self, name: str) -> None:
|
||||||
|
"""Disable the config of the given name"""
|
||||||
|
path = self.runtime_path / name
|
||||||
|
path.symlink_to("/dev/null")
|
||||||
|
self.reload()
|
||||||
|
|
||||||
def remove_config(self, name: str) -> None:
|
def remove_config(self, name: str) -> None:
|
||||||
"""
|
"""
|
||||||
|
@ -93,6 +93,9 @@ def setup_mesh(gateway_mode: str = "off"):
|
|||||||
gateway_mode=gateway_mode,
|
gateway_mode=gateway_mode,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Fix for issue #19
|
||||||
|
networkd.disable_config("80-wifi-adhoc.network")
|
||||||
|
|
||||||
for i in get_sorted_glob(args.networkd_config_dir, MESH_GLOB):
|
for i in get_sorted_glob(args.networkd_config_dir, MESH_GLOB):
|
||||||
logger.debug("Adding network config %s", i)
|
logger.debug("Adding network config %s", i)
|
||||||
networkd.add_config(i)
|
networkd.add_config(i)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user