Module: Facter::Util::Partitions::OpenBSD

Defined in:
lib/facter/util/partitions/openbsd.rb

Class Method Summary collapse

Class Method Details

.filesystem(partition) ⇒ Object



22
23
24
# File 'lib/facter/util/partitions/openbsd.rb', line 22

def self.filesystem(partition)
  scan_mount(/\/dev\/#{partition}\son\s\S+\stype\s(\S+)/)
end

.listObject



3
4
5
# File 'lib/facter/util/partitions/openbsd.rb', line 3

def self.list
  Facter::Core::Execution.exec('df').scan(/\/dev\/(\S+)/).flatten
end

.mount(partition) ⇒ Object



13
14
15
# File 'lib/facter/util/partitions/openbsd.rb', line 13

def self.mount(partition)
  scan_mount(/\/dev\/#{partition}\son\s(\S+)/)
end

.size(partition) ⇒ Object

Reported size is in 1K blocks



18
19
20
# File 'lib/facter/util/partitions/openbsd.rb', line 18

def self.size(partition)
  scan_df(/\/dev\/#{partition}\s+(\S+)/)
end

.uuid(partition) ⇒ Object

On OpenBSD partitions don’t have a UUID; disks have DUID but that’s not compatible.



9
10
11
# File 'lib/facter/util/partitions/openbsd.rb', line 9

def self.uuid(partition)
  nil
end