From fd86f5a57e5d9334cd2361043e1c2cbbabd5c9d5 Mon Sep 17 00:00:00 2001 From: Chris Hubbard Date: Tue, 6 May 2014 15:09:33 -0400 Subject: [PATCH] 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 --- plugins/guests/mint/guest.rb | 13 +++++++++++++ plugins/guests/mint/plugin.rb | 15 +++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 plugins/guests/mint/guest.rb create mode 100644 plugins/guests/mint/plugin.rb diff --git a/plugins/guests/mint/guest.rb b/plugins/guests/mint/guest.rb new file mode 100644 index 000000000..5feb33849 --- /dev/null +++ b/plugins/guests/mint/guest.rb @@ -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 diff --git a/plugins/guests/mint/plugin.rb b/plugins/guests/mint/plugin.rb new file mode 100644 index 000000000..bfab4b749 --- /dev/null +++ b/plugins/guests/mint/plugin.rb @@ -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