From bc7b481dbe2f3bbed18cceb3567ff801305ef04e Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 17 Jul 2013 13:39:32 -0500 Subject: [PATCH] Get the deb/ubuntu change host name correct --- plugins/guests/debian/cap/change_host_name.rb | 2 +- plugins/guests/ubuntu/cap/change_host_name.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/guests/debian/cap/change_host_name.rb b/plugins/guests/debian/cap/change_host_name.rb index 114916015..cda095248 100644 --- a/plugins/guests/debian/cap/change_host_name.rb +++ b/plugins/guests/debian/cap/change_host_name.rb @@ -9,7 +9,7 @@ module VagrantPlugins comm.sudo("sed -i 's/.*$/#{name.split('.')[0]}/' /etc/hostname") comm.sudo("hostname -F /etc/hostname") comm.sudo("hostname --fqdn > /etc/mailname") - comm.sudo("ifdown -a; ifup -a --allow=hotplug") + comm.sudo("ifdown -a; ifup -a; ifup -a --allow=hotplug") end end end diff --git a/plugins/guests/ubuntu/cap/change_host_name.rb b/plugins/guests/ubuntu/cap/change_host_name.rb index 19e9cd887..b7ba03773 100644 --- a/plugins/guests/ubuntu/cap/change_host_name.rb +++ b/plugins/guests/ubuntu/cap/change_host_name.rb @@ -14,7 +14,7 @@ module VagrantPlugins comm.sudo("service hostname start") end comm.sudo("hostname --fqdn > /etc/mailname") - comm.sudo("ifdown -a; ifup -a --allow=hotplug") + comm.sudo("ifdown -a; ifup -a; ifup -a --allow=hotplug") end end end