Skip to content

Commit

Permalink
Makes remove_on_suspend default to true. fixes agiledivider#19
Browse files Browse the repository at this point in the history
  • Loading branch information
markjaquith committed Jun 29, 2013
1 parent 423a13c commit 7d7cc8a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 = false

## Versions

Expand Down
2 changes: 1 addition & 1 deletion lib/vagrant-hostsupdater/Action/RemoveHosts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7d7cc8a

Please sign in to comment.