mirror of
https://git.disroot.org/pranav/pybatmesh.git
synced 2024-11-08 21:52:35 +05:30
removed arguments added in previous commit
Too much configs and args make debugging harder. The class networkd will be used to add config files to the networkd runtime dir after formatting the file with str.format().
This commit is contained in:
parent
25a5bdee30
commit
25ac54dfad
@ -170,13 +170,6 @@ def parse_args() -> Namespace:
|
||||
"-v", "--verbose", action="count", default=0, help="increase output verbosity"
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--glob-mesh-configs",
|
||||
type=str,
|
||||
default=config["globs"]["meshconfigs"],
|
||||
help="glob matching filenames for mesh configuration",
|
||||
)
|
||||
|
||||
# logger.debug("Parsing arguments")
|
||||
return parser.parse_args()
|
||||
|
||||
|
@ -31,7 +31,6 @@ CONFIG = {
|
||||
"confdir": "/usr/share/naxalnet/networkd",
|
||||
"runtimedir": "/run/systemd/network",
|
||||
},
|
||||
"globs": {"meshconfigs": "mesh.*", "checkconfigs": "check.*"},
|
||||
"adhoc": {"name": "NxMesh"},
|
||||
"ap": {"ssid": "MeshWiFi", "passwd": "naxalnet256"},
|
||||
}
|
||||
@ -39,6 +38,8 @@ CONFIG = {
|
||||
# glob
|
||||
CONFIG_FILES = ["naxalnet.conf", "naxalnet.conf.d/*.conf"]
|
||||
CONFIG_DIRS = ["/usr/share/naxalnet", "/usr/local/share/naxalnet", "/etc/naxalnet"]
|
||||
MESH_GLOB = "mesh.*"
|
||||
TMP_NET_GLOB = "tmp.*"
|
||||
|
||||
ISSUE_URL = "https://git.disroot.org/pranav/naxalnet/issues"
|
||||
REPORT_BUG_INFO = "If you think this is a bug, report it to " + ISSUE_URL
|
||||
|
@ -42,4 +42,11 @@ class Networkd:
|
||||
|
||||
def __init__(self, bus=SystemMessageBus()):
|
||||
self._bus = bus
|
||||
self.proxy_reload()
|
||||
|
||||
def proxy_reload(self):
|
||||
"""reload the proxy"""
|
||||
self.proxy = self._bus.get_proxy(NETWORKD_BUS, NETWORKD_PATH)
|
||||
|
||||
def add_config(self, path: str):
|
||||
"""add config file to runtime directory and reload networkd"""
|
||||
|
@ -34,7 +34,7 @@ console_scripts =
|
||||
lib/systemd/system =
|
||||
naxalnet.service
|
||||
# If installing with pip, this file will be copied to some other place.
|
||||
# This is the reason we use setup.py instead of pip.
|
||||
# This is the reason we use setup.py instead of pip in the Makefile.
|
||||
/etc/naxalnet =
|
||||
naxalnet.conf.example
|
||||
share/naxalnet/networkd =
|
||||
@ -45,3 +45,4 @@ share/naxalnet/networkd =
|
||||
systemd-networkd/mesh.05-wireless-ap.network
|
||||
systemd-networkd/mesh.06-eth.network
|
||||
systemd-networkd/mesh.07-bridge.network
|
||||
systemd-networkd/tmp.01-eth.network
|
||||
|
Loading…
Reference in New Issue
Block a user