From 0b3e703498f759b048367bc00acfafdab5c16c52 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 27 Jun 2012 11:18:23 -0700 Subject: [PATCH] Add the gateway to hostonly network interfaces on Debian [GH-990] --- lib/vagrant/action/vm/network.rb | 7 ++++--- templates/guests/debian/network_static.erb | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/vagrant/action/vm/network.rb b/lib/vagrant/action/vm/network.rb index 4a7a5caa0..f10d5d957 100644 --- a/lib/vagrant/action/vm/network.rb +++ b/lib/vagrant/action/vm/network.rb @@ -259,9 +259,10 @@ module Vagrant def hostonly_network_config(config) return { - :type => config[:type], - :ip => config[:ip], - :netmask => config[:netmask] + :type => config[:type], + :adapter_ip => config[:adapter_ip], + :ip => config[:ip], + :netmask => config[:netmask] } end diff --git a/templates/guests/debian/network_static.erb b/templates/guests/debian/network_static.erb index fa505afa9..936d2f834 100644 --- a/templates/guests/debian/network_static.erb +++ b/templates/guests/debian/network_static.erb @@ -4,4 +4,5 @@ auto eth<%= options[:interface] %> iface eth<%= options[:interface] %> inet static address <%= options[:ip] %> netmask <%= options[:netmask] %> + gateway <%= options[:adapter_ip] %> #VAGRANT-END