Skip to content
Snippets Groups Projects
Commit aa3587c6 authored by Nicolas KAROLAK's avatar Nicolas KAROLAK
Browse files

fix systemd output parsing

parent 5bac7c05
No related branches found
No related tags found
No related merge requests found
......@@ -17,8 +17,6 @@ from envsetup import utils as u # noqa: E402
def get_dns_servers() -> set:
servers = list()
if subprocess.getstatusoutput("command -v nmcli")[0] == 0:
# network-manager
_, output = subprocess.getstatusoutput(
......@@ -34,6 +32,7 @@ def get_dns_servers() -> set:
if "127.0.0.53" in servers:
# systemd-resolved
servers = list()
_, output = subprocess.getstatusoutput("systemd-resolve --status")
lines = [l.strip() for l in output.split("\n")]
dns_line = False
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment