From f1dd5459f29533a24a0653657214142fbdcfa93a Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 25 Jan 2012 10:39:17 -0800 Subject: [PATCH] Properly detect Arch, Fedora, FreeBSD [GH-683] --- CHANGELOG.md | 2 ++ lib/vagrant/hosts/arch.rb | 5 +++++ lib/vagrant/hosts/fedora.rb | 5 +++++ lib/vagrant/hosts/freebsd.rb | 5 +++++ 4 files changed, 17 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 27ff87b87..def25b3e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ such as `~`. - NFS shared folders with a `:create` flag will have their host folders properly created if they don't exist. [GH-667] + - Fix the precedence for Arch, Ubuntu, and FreeBSD host classes so + they are properly detected. [GH-683] ## 0.9.3 (January 24, 2012) diff --git a/lib/vagrant/hosts/arch.rb b/lib/vagrant/hosts/arch.rb index f9e391b7d..da52effeb 100644 --- a/lib/vagrant/hosts/arch.rb +++ b/lib/vagrant/hosts/arch.rb @@ -5,6 +5,11 @@ module Vagrant File.exist?("/etc/rc.conf") && File.exist?("/etc/pacman.conf") end + # Normal, mid-range precedence. + def self.precedence + 5 + end + def nfs_export(id, ip, folders) output = TemplateRenderer.render('nfs/exports_linux', :uuid => id, diff --git a/lib/vagrant/hosts/fedora.rb b/lib/vagrant/hosts/fedora.rb index b092a3072..1d2f17756 100644 --- a/lib/vagrant/hosts/fedora.rb +++ b/lib/vagrant/hosts/fedora.rb @@ -15,6 +15,11 @@ module Vagrant false end + # Normal, mid-range precedence. + def self.precedence + 5 + end + def initialize(*args) super diff --git a/lib/vagrant/hosts/freebsd.rb b/lib/vagrant/hosts/freebsd.rb index ea19dcc48..6d0d17329 100644 --- a/lib/vagrant/hosts/freebsd.rb +++ b/lib/vagrant/hosts/freebsd.rb @@ -11,6 +11,11 @@ module Vagrant Util::Platform.freebsd? end + # Normal, mid-range precedence. + def self.precedence + 5 + end + def initialize(*args) super