8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# File 'lib/fs/modules/LinuxMountProbe.rb', line 8
def self.probe(fs)
unless LINUX_FS_TYPES.include?(fs.fsType)
$log.info "LinuxMountProbe << FALSE because file system (#{fs.fsType}) is not supported" if $log
return false
end
if (fs.dirEntries & LINUX_ROOT_DIRS).length != LINUX_ROOT_DIRS.length
$log.debug "LinuxMountProbe << FALSE because root directories (#{LINUX_ROOT_DIRS.inspect}) missing in: #{fs.dirEntries.inspect}" if $log
return false
end
LINUX_ROOT_FILES.each do |f|
unless fs.fileExists?(f)
$log.info "LinuxMountProbe << FALSE because file #{f} does not exist" if $log
return false
end
end
$log.debug "LinuxMountProbe << TRUE" if $log
true
end
|