Add Linux Mint detection

* Linux Mint is a popular distribution based on Ubuntu
* When creating a VM based on Linux Mint, it cannot detect
that it is based on Ubuntu and it is detected as just linux
and configure_networks fails
* https://github.com/mitchellh/vagrant/issues/3647
This commit is contained in:
Chris Hubbard 2014-05-06 15:09:33 -04:00
parent 7a2f4c2168
commit fd86f5a57e
2 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,13 @@
require "vagrant"
require Vagrant.source_root.join("plugins/guests/ubuntu/guest")
module VagrantPlugins
module GuestMint
class Guest < VagrantPlugins::GuestUbuntu::Guest
def detect?(machine)
machine.communicate.test("cat /etc/issue | grep 'Linux Mint'")
end
end
end
end

View File

@ -0,0 +1,15 @@
require "vagrant"
module VagrantPlugins
module GuestMint
class Plugin < Vagrant.plugin("2")
name "Mint guest"
description "Mint guest support."
guest("mint", "ubuntu") do
require File.expand_path("../guest", __FILE__)
Guest
end
end
end
end