diff --git a/plugins/guests/funtoo/cap/change_host_name.rb b/plugins/guests/funtoo/cap/change_host_name.rb deleted file mode 100644 index 298ff5b12..000000000 --- a/plugins/guests/funtoo/cap/change_host_name.rb +++ /dev/null @@ -1,17 +0,0 @@ -module VagrantPlugins - module GuestFuntoo - module Cap - class ChangeHostName - def self.change_host_name(machine, name) - machine.communicate.tap do |comm| - if !comm.test("sudo hostname --fqdn | grep '#{name}'") - comm.sudo("echo 'hostname=#{name.split('.')[0]}' > /etc/conf.d/hostname") - comm.sudo("sed -i 's@^\\(127[.]0[.]0[.]1[[:space:]]\\+\\)@\\1#{name} #{name.split('.')[0]} @' /etc/hosts") - comm.sudo("hostname #{name.split('.')[0]}") - end - end - end - end - end - end -end diff --git a/plugins/guests/funtoo/cap/configure_networks.rb b/plugins/guests/funtoo/cap/configure_networks.rb deleted file mode 100644 index 9fe51c1f9..000000000 --- a/plugins/guests/funtoo/cap/configure_networks.rb +++ /dev/null @@ -1,43 +0,0 @@ -require "tempfile" - -require "vagrant/util/template_renderer" - -module VagrantPlugins - module GuestFuntoo - module Cap - class ConfigureNetworks - include Vagrant::Util - - def self.configure_networks(machine, networks) - machine.communicate.tap do |comm| - # Configure each network interface - networks.each do |network| - # http://www.funtoo.org/Funtoo_Linux_Networking - # dhcpcd generally runs on all interfaces by default - # in the future we can change this, dhcpcd has lots of features - # it would be nice to expose more of its capabilities... - if not /dhcp/i.match(network[:type]) - line = "denyinterfaces eth#{network[:interface]}" - cmd = "grep '#{line}' /etc/dhcpcd.conf; if [ $? -ne 0 ]; then echo '#{line}' >> /etc/dhcpcd.conf ; fi" - comm.sudo(cmd) - ifFile = "netif.eth#{network[:interface]}" - entry = TemplateRenderer.render("guests/funtoo/network_#{network[:type]}", - :options => network) - # Upload the entry to a temporary location - temp = Tempfile.new("vagrant") - temp.binmode - temp.write(entry) - temp.close - comm.upload(temp.path, "/tmp/vagrant-network-entry-#{ifFile}") - comm.sudo("cp /tmp/vagrant-#{ifFile} /etc/conf.d/#{ifFile}") - comm.sudo("chmod 0644 /etc/conf.d/#{ifFile}") - comm.sudo("ln -fs /etc/init.d/netif.tmpl /etc/init.d/#{ifFile}") - comm.sudo("/etc/init.d/#{ifFile} start") - end - end - end - end - end - end - end -end diff --git a/plugins/guests/funtoo/guest.rb b/plugins/guests/funtoo/guest.rb deleted file mode 100644 index adffd194e..000000000 --- a/plugins/guests/funtoo/guest.rb +++ /dev/null @@ -1,9 +0,0 @@ -module VagrantPlugins - module GuestFuntoo - class Guest < Vagrant.plugin("2", :guest) - def detect?(machine) - machine.communicate.test("grep Funtoo /etc/gentoo-release") - end - end - end -end diff --git a/plugins/guests/funtoo/plugin.rb b/plugins/guests/funtoo/plugin.rb deleted file mode 100644 index 7e3227df5..000000000 --- a/plugins/guests/funtoo/plugin.rb +++ /dev/null @@ -1,25 +0,0 @@ -require "vagrant" - -module VagrantPlugins - module GuestFuntoo - class Plugin < Vagrant.plugin("2") - name "Funtoo guest" - description "Funtoo guest support." - - guest("funtoo", "linux") do - require File.expand_path("../guest", __FILE__) - Guest - end - - guest_capability("funtoo", "change_host_name") do - require_relative "cap/change_host_name" - Cap::ChangeHostName - end - - guest_capability("funtoo", "configure_networks") do - require_relative "cap/configure_networks" - Cap::ConfigureNetworks - end - end - end -end diff --git a/templates/guests/funtoo/network_dhcp.erb b/templates/guests/funtoo/network_dhcp.erb deleted file mode 100644 index 43fb093bf..000000000 --- a/templates/guests/funtoo/network_dhcp.erb +++ /dev/null @@ -1,4 +0,0 @@ -#VAGRANT-BEGIN -# The contents below are automatically generated by Vagrant. Do not modify. -template='dhcp' -#VAGRANT-END diff --git a/templates/guests/funtoo/network_static.erb b/templates/guests/funtoo/network_static.erb deleted file mode 100644 index ab6a09d10..000000000 --- a/templates/guests/funtoo/network_static.erb +++ /dev/null @@ -1,6 +0,0 @@ -#VAGRANT-BEGIN -# The contents below are automatically generated by Vagrant. Do not modify. -template='interface' -ipaddr='<%= options[:ip] %>/<%= options[:netmask] %>' -<%= [:gateway, :nameservers, :domain, :route, :gateway6, :route6, :mtu].reduce([]) { |a,i| a.push("#{i}=#{options[i]}") if options[i]; a }.join("\n") %> -#VAGRANT-END