Ignore swap or altroot entries
This commit is contained in:
parent
d68eb7272e
commit
792d8d1808
1 changed files with 2 additions and 0 deletions
|
@ -948,6 +948,8 @@ class OpenBSDHardware(Hardware):
|
||||||
if line.startswith('#') or line.strip() == '':
|
if line.startswith('#') or line.strip() == '':
|
||||||
continue
|
continue
|
||||||
fields = re.sub(r'\s+',' ',line.rstrip('\n')).split()
|
fields = re.sub(r'\s+',' ',line.rstrip('\n')).split()
|
||||||
|
if fields[1] == 'none' or fields[3] == 'xx':
|
||||||
|
continue
|
||||||
self.facts['mounts'].append({'mount': fields[1], 'device': fields[0], 'fstype' : fields[2], 'options': fields[3]})
|
self.facts['mounts'].append({'mount': fields[1], 'device': fields[0], 'fstype' : fields[2], 'options': fields[3]})
|
||||||
|
|
||||||
def get_memory_facts(self):
|
def get_memory_facts(self):
|
||||||
|
|
Loading…
Reference in a new issue