Gentoo needs its own prepare_host_only_network method
This commit is contained in:
parent
272b421e0b
commit
3643181021
|
@ -1,6 +1,19 @@
|
||||||
module Vagrant
|
module Vagrant
|
||||||
module Systems
|
module Systems
|
||||||
class Gentoo < Linux
|
class Gentoo < Linux
|
||||||
|
def prepare_host_only_network
|
||||||
|
# Remove any previous host only network additions to the
|
||||||
|
# interface file.
|
||||||
|
vm.ssh.execute do |ssh|
|
||||||
|
# Verify gentoo
|
||||||
|
# ssh.exec!("cat /etc/gentoo-release", :error_class => GentooError, :_key => :network_not_gentoo)
|
||||||
|
|
||||||
|
# Clear out any previous entries
|
||||||
|
ssh.exec!("sudo sed -e '/^#VAGRANT-BEGIN/,/^#VAGRANT-END/ d' /etc/conf.d/net > /tmp/vagrant-network-interfaces")
|
||||||
|
ssh.exec!("sudo su -c 'cat /tmp/vagrant-network-interfaces > /etc/conf.d/net'")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def enable_host_only_network(net_options)
|
def enable_host_only_network(net_options)
|
||||||
entry = TemplateRenderer.render('network_entry_gentoo', :net_options => net_options)
|
entry = TemplateRenderer.render('network_entry_gentoo', :net_options => net_options)
|
||||||
vm.ssh.upload!(StringIO.new(entry), "/tmp/vagrant-network-entry")
|
vm.ssh.upload!(StringIO.new(entry), "/tmp/vagrant-network-entry")
|
||||||
|
|
Loading…
Reference in New Issue