vagrant-landrush / landrush

A Vagrant plugin that provides a simple DNS server for Vagrant guests
MIT License
666 stars 78 forks source link

Clean up host DNS configuration when executing 'vagrant halt' #251

Open bexelbie opened 8 years ago

bexelbie commented 8 years ago

Configuration files in /etc/dnsmasq.d and changes to /etc/resolv.conf should be cleaned up.

hferentschik commented 7 years ago

I don't think the case is so simple, as to cleanup when the VM halts. The config changes are necessary for any VM using Landrush. You might have more than one VM running. Cleaning up when the first one halts, will screw things up for the other VMs.

I guess that's where dependent VMs come in. If possible we could track whether the last Landrush VM is getting shut down and if so clean up. But to be honest, I am not sure whether it is worth to go through so much hazzle. In fact it is quite handy that this entries are kept around, since I don't have to provide the sudo password each time starting the VM.

What might make sense, is to have an explicit command to clean up the host config. This way, one does not have to manually find the file to change. It would be only on explicit request by the user though. WDYT?