Class: Inspec::Resources::EtcFstab
- Inherits:
-
Object
- Object
- Inspec::Resources::EtcFstab
- Includes:
- FileReader, Utils::CommentParser
- Defined in:
- lib/inspec/resources/etc_fstab.rb
Instance Attribute Summary collapse
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Instance Method Summary collapse
- #home_mount_options ⇒ Object
-
#initialize(fstab_path = nil) ⇒ EtcFstab
constructor
A new instance of EtcFstab.
- #nfs_file_systems ⇒ Object
- #to_s ⇒ Object
Methods included from FileReader
Methods included from Utils::CommentParser
Constructor Details
#initialize(fstab_path = nil) ⇒ EtcFstab
Returns a new instance of EtcFstab.
31 32 33 34 35 36 37 |
# File 'lib/inspec/resources/etc_fstab.rb', line 31 def initialize(fstab_path = nil) @conf_path = fstab_path || "/etc/fstab" @files_contents = {} @content = nil @params = nil read_content end |
Instance Attribute Details
#params ⇒ Object (readonly)
Returns the value of attribute params.
26 27 28 |
# File 'lib/inspec/resources/etc_fstab.rb', line 26 def params @params end |
Instance Method Details
#home_mount_options ⇒ Object
54 55 56 57 58 |
# File 'lib/inspec/resources/etc_fstab.rb', line 54 def return nil unless where { mount_point == "/home" }.configured? where { mount_point == "/home" }.entries[0]. end |
#nfs_file_systems ⇒ Object
50 51 52 |
# File 'lib/inspec/resources/etc_fstab.rb', line 50 def nfs_file_systems where { file_system_type.match(/nfs/) } end |
#to_s ⇒ Object
60 61 62 |
# File 'lib/inspec/resources/etc_fstab.rb', line 60 def to_s "File System Table File (fstab)" end |