Skip to content

Commit

Permalink
Bugfix: Revert /etc/resolv.conf only if skip_dns_patch is false
Browse files Browse the repository at this point in the history
  • Loading branch information
1951FDG committed Mar 18, 2021
1 parent f0bd26a commit f97923d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion openpyn/openpyn.py
Original file line number Diff line number Diff line change
Expand Up @@ -611,8 +611,9 @@ def run(init: bool, server: str, country_code: str, country: str, area: str, tcp
else:
logger.info("To see usage options type: 'openpyn -h' or 'openpyn --help'")

if skip_dns_patch is False:
# Darwin: Revert /etc/resolv.conf back to the original if it was modified
subprocess.call(["sudo", "-u", sudo_user, __basefilepath__ + "scripts/revert-manual-dns-patch.sh"])
subprocess.call(["sudo", "-u", sudo_user, __basefilepath__ + "scripts/revert-manual-dns-patch.sh"])

# if everything went ok
return 0
Expand Down

0 comments on commit f97923d

Please sign in to comment.