mitchellh/vagrant — pull request #574 by cwarden (2011-11-30 01:02:06+00:00)
Title: Improve hostname-changing support on Debian

- Store short hostname in /etc/hostname on Debian
(see http://oreilly.com/openbook/debian/book/ch10_02.html#CH10-PGFID-460680)

- Support switching between short hostnames and fully-qualified domain
names in config.vm.host_name

- Overwrite entire 127.0.1.1 line in /etc/hosts so it doesn't contain
old hostnames when the hostname changes

- Fix testing of current hostname so changes to domain work as do
changes in which the new hostname is a substring of the old hostname

*The change to the unit test doesn't actually test these changes. Being new to both vagrant and ruby, I couldn't figure out how to create a distribution-specific test. Help would be appreciated.*