Skip to content

only change /etc/hosts between control tokens on linux #21

merged 1 commit into from Apr 9, 2012

2 participants

sbeam commented Apr 9, 2012

Here is a re-done version of the recently closed pull request for this functionality, based on the the latest clean HEAD. Also tidied up a few things and added more explicit tests around the tokens themselves.

Note, this will have an unexpected effect on someone who is already using ghost, since it will start ignoring their previously entered entries. They'd have to re-add things, or add the #ghost start and # ghost end comments to the hosts file. Probably worth mentioning in the docs.

@sbeam sbeam only change /etc/hosts between control tokens
affects only linux version because dscl is used on OSX

puts '# ghost start' and '# ghost end' comments in the hostsfile on
first run, and only changes lines in between these tokens thereafter.
@bjeanes bjeanes merged commit f1d4333 into bjeanes:master Apr 9, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.