Created
April 10, 2014 19:16
-
-
Save delphyne/10413691 to your computer and use it in GitHub Desktop.
There is an obscure bug in OSX (described here: http://stevegrunwell.com/blog/quick-tip-troubleshooting-etchosts-issues/) that causes IP resolution for hosts in /etc/hosts take up to 2 minutes (!!!!) if there are more than 10 aliases on a single line. For us at Spredfast, this occurs in our Vagrant environment when we co-locate too many services…
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/(vagrant-hostmanager-start|vagrant-hostmanager-end)/{f=f?0:1}f && /[0-9]+\.[0-9]+\.[0-9]+\.[0-9]/ { | |
if (NF>2) { | |
out="" | |
for (i=2;i<=NF;i++) { | |
out=(out $1 "\t" $(i) "\n") | |
} | |
$0=out | |
} | |
}1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment