Giter Site home page Giter Site logo

Comments (2)

pbitty avatar pbitty commented on May 19, 2024

Hi @kminder, the 127.0.0.1 ... line in the hosts file is changed by vagrant itself when it configures the guest's hostname. vagrant-hostmanager only touches the lines that it adds.

Cleaning the 127.0.0.1 line could be done, as you suggested, but at a first glance it looks to me like this is a very specific case of a more general issue.

At the moment, there are two guests OS types where vagrant updates /etc/hosts in a similar way: Redhat/Centos and Debian/Ubuntu. In the Debian case, it actually adds a 127.0.1.1 line - I'm not exactly sure why. I think if we were to edit only the 127.0.0.1 line, we would still have this issue in Debian/Ubuntu guests.

It seems to me that in general we would want hostmanager to remove any names in /etc/hosts that conflict with the ones it is to add.

I think this would involve some parsing etc/hosts to find these entries, and for each one, take out the conflicting names in that line while leaving the rest of the entry if there are other names, (skipping comment lines and so on).

What do you think?

Is this something you would be interested in contributing?

from vagrant-hostmanager.

pbitty avatar pbitty commented on May 19, 2024

Closing this. If you'd like to look into it further, feel free to reopen.

from vagrant-hostmanager.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.