Add MacOS manual DNS patch and revert #252
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
skip_dns_patch = True
to allow manual patching of/etc/resolv.conf
on Mac OS (darwin
)/etc/resolv.conf
is moved to/etc/resolv.conf.backup
before overwrite/etc/resolv.conf
file; backup file is removed in this process (mv -f
)requirements.txt
file for local development / IDE help e.g.pip install -r requirements.txt
Testing
/etc/resolv.conf
being overwritten with values frommanual-dns-patch.sh
after original conf file is moved to/etc/resolv.conf.backup
/etc/resolv.conf.backup
being used to overwrite/etc/resolv.conf
Note
Running the subprocess as the final step before exiting seems pretty sloppy but this is currently just a hacky fix. If openpyn is force killed or quits in a way that doesn't allow it to shutdown gracefully then
/etc/resolv.conf
will be replaced on next system restart (Mac OS automatic process from my understanding). The/etc/resolv.conf.backup
file will hang around though. 馃