From 8b1ff15435cf037bce96b0cb08858104bda0e325 Mon Sep 17 00:00:00 2001 From: Michael Marineau Date: Sun, 27 Apr 2014 19:37:11 -0400 Subject: [PATCH] fix(coreos-base/oem-vagrant): Rework network configuration code. - Only write configs for static networks, DHCP will work by default. - Match interfaces by MAC address if possible. - Use the configured netmask instead of always using a /24 - Define default addresses in /etc/environment based on the type of network. Now using both a private and a public network works! --- .../files/box/configure_networks.rb | 109 ++++++++++++++---- 1 file changed, 86 insertions(+), 23 deletions(-) diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vagrant/files/box/configure_networks.rb b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vagrant/files/box/configure_networks.rb index 674e475eab..392fd50ba0 100644 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vagrant/files/box/configure_networks.rb +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vagrant/files/box/configure_networks.rb @@ -7,11 +7,17 @@ require 'tempfile' require 'ipaddr' +require 'log4r' require Vagrant.source_root.join("plugins/guests/coreos/cap/configure_networks.rb") BASE_CLOUD_CONFIG = <