guests/redhat: configure networks properly on EL7 [GH-4195]

This commit is contained in:
Mitchell Hashimoto 2014-08-30 22:49:13 -07:00
parent ee70bdd028
commit f4ee4764bb
2 changed files with 18 additions and 0 deletions

View File

@ -70,6 +70,7 @@ BUG FIXES:
[GH-4403] [GH-4403]
- guests/redhat: NFS setup should use systemd for RH7+ [GH-4228] - guests/redhat: NFS setup should use systemd for RH7+ [GH-4228]
- guests/redhat: Detect RHEL 7 (and CentOS) and install Docker properly. [GH-4402] - guests/redhat: Detect RHEL 7 (and CentOS) and install Docker properly. [GH-4402]
- guests/redhat: Configuring networks on EL7 works. [GH-4195]
- guests/smartos: Use `pfexec` for rsync. [GH-4274] - guests/smartos: Use `pfexec` for rsync. [GH-4274]
- guests/windows: Reboot after hostname change. [GH-3987] - guests/windows: Reboot after hostname change. [GH-3987]
- hosts/arch: NFS works with latest versions. [GH-4224] - hosts/arch: NFS works with latest versions. [GH-4224]

View File

@ -12,6 +12,23 @@ module VagrantPlugins
include Vagrant::Util include Vagrant::Util
def self.configure_networks(machine, networks) def self.configure_networks(machine, networks)
case machine.guest.capability("flavor")
when :rhel_7
configure_networks_rhel7(machine)
else
configure_networks_default(machine)
end
end
def self.configure_networks_rhel7(machine, networks)
# This is kind of jank but the configure networks is the same
# as Fedora at this point.
require File.expand_path("../../fedora/cap/configure_networks", __FILE__)
::VagrantPlugins::GuestFedora::Cap::ConfigureNetworks.
configure_networks(machine, networks)
end
def self.configure_networks_default(machine, networks)
network_scripts_dir = machine.guest.capability("network_scripts_dir") network_scripts_dir = machine.guest.capability("network_scripts_dir")
# Accumulate the configurations to add to the interfaces file as # Accumulate the configurations to add to the interfaces file as