From 55daf5b7aad4e91d71a6247f5fd96d08da75f5c1 Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Sat, 29 Jun 2013 13:11:22 -0400 Subject: [PATCH] Makes remove_on_suspend default to true. fixes #19 --- README.md | 6 +++--- lib/vagrant-hostsupdater/Action/RemoveHosts.rb | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5a5b962..67c1a04 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,10 @@ This plugin adds an entry to your /etc/hosts file on the host system. On **up**, **resume** and **reload** commands, it tries to add the information, if its not already existant in your hosts file. If it needs to be added, you will be asked for an administrator password, since it uses sudo to edit the file. -On **halt** and **destroy**, those entries will be removed again. -By setting the remove\_on\_suspend option, you can have them removed on **suspend**, too: +On **halt**, **destroy**, and **suspend**, those entries will be removed again. +By setting the remove\_on\_suspend option to `false`, **suspend** will not remove them: - config.hostsupdater.remove_on_suspend = true + config.hostsupdater.remove_on_suspend = falsee ## Versions diff --git a/lib/vagrant-hostsupdater/Action/RemoveHosts.rb b/lib/vagrant-hostsupdater/Action/RemoveHosts.rb index b146aed..d813c67 100644 --- a/lib/vagrant-hostsupdater/Action/RemoveHosts.rb +++ b/lib/vagrant-hostsupdater/Action/RemoveHosts.rb @@ -12,7 +12,7 @@ def initialize(app, env) def call(env) machine_action = env[:machine_action] - if machine_action != :suspend || @machine.config.hostsupdater.remove_on_suspend + if machine_action != :suspend || false != @machine.config.hostsupdater.remove_on_suspend @ui.info "Removing hosts" removeHostEntries else