Module: Inspec::Utils::BsdMountParser
- Included in:
- Resources::BsdMounts
- Defined in:
- lib/inspec/utils/parser.rb
Instance Method Summary collapse
-
#parse_mount_options(mount_line, _compatibility = false) ⇒ Object
this parses the output of mount command (only tested on freebsd) this method expects only one line of the mount output.
Instance Method Details
#parse_mount_options(mount_line, _compatibility = false) ⇒ Object
this parses the output of mount command (only tested on freebsd) this method expects only one line of the mount output
130 131 132 133 134 135 136 137 138 |
# File 'lib/inspec/utils/parser.rb', line 130 def (mount_line, _compatibility = false) return {} if mount_line.nil? || mount_line.empty? mount = mount_line.chomp.split(" ", 4) = mount[3].tr("()", "").split(", ") # parse device and type { device: mount[0], type: .shift, options: } end |