Class: Vagrant::Hosts::FreeBSD

Inherits:
BSD
  • Object
show all
Includes:
Util, Util::Retryable
Defined in:
lib/vagrant/hosts/freebsd.rb

Overview

Represents a FreeBSD host

Defined Under Namespace

Classes: FreeBSDHostError

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Util::Retryable

#retryable

Methods inherited from BSD

#nfs?, #nfs_prune

Methods inherited from Base

#nfs?, #nfs_prune

Constructor Details

#initialize(*args) ⇒ FreeBSD

Returns a new instance of FreeBSD.



33
34
35
36
37
38
# File 'lib/vagrant/hosts/freebsd.rb', line 33

def initialize(*args)
  super

  @nfs_restart_command = "sudo /etc/rc.d/mountd onereload"
  @nfs_exports_template = "nfs/exports_freebsd"
end

Class Method Details

.match?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/vagrant/hosts/freebsd.rb', line 14

def self.match?
  Util::Platform.freebsd?
end

.precedenceObject

Normal, mid-range precedence.



19
20
21
# File 'lib/vagrant/hosts/freebsd.rb', line 19

def self.precedence
  5
end

Instance Method Details

#nfs_export(id, ip, folders) ⇒ Object



23
24
25
26
27
28
29
30
31
# File 'lib/vagrant/hosts/freebsd.rb', line 23

def nfs_export(id, ip, folders)
  folders.each do |folder_name, folder_values|
    if folder_values[:hostpath] =~ /\s+/
      raise FreeBSDHostError, :_key => :nfs_whitespace
    end
  end

  super
end