Merge pull request #3147 from toshywoshy/setup_mtab_without_bind
changed get_mount_facts to ignore mount types 'none'
This commit is contained in:
commit
0596f474cf
1 changed files with 11 additions and 10 deletions
21
system/setup
21
system/setup
|
@ -617,16 +617,17 @@ class LinuxHardware(Hardware):
|
||||||
for line in mtab.split('\n'):
|
for line in mtab.split('\n'):
|
||||||
if line.startswith('/'):
|
if line.startswith('/'):
|
||||||
fields = line.rstrip('\n').split()
|
fields = line.rstrip('\n').split()
|
||||||
statvfs_result = os.statvfs(fields[1])
|
if(fields[2] != 'none'):
|
||||||
self.facts['mounts'].append(
|
statvfs_result = os.statvfs(fields[1])
|
||||||
{'mount': fields[1],
|
self.facts['mounts'].append(
|
||||||
'device':fields[0],
|
{'mount': fields[1],
|
||||||
'fstype': fields[2],
|
'device':fields[0],
|
||||||
'options': fields[3],
|
'fstype': fields[2],
|
||||||
# statvfs data
|
'options': fields[3],
|
||||||
'size_total': statvfs_result.f_bsize * statvfs_result.f_blocks,
|
# statvfs data
|
||||||
'size_available': statvfs_result.f_bsize * (statvfs_result.f_bavail),
|
'size_total': statvfs_result.f_bsize * statvfs_result.f_blocks,
|
||||||
})
|
'size_available': statvfs_result.f_bsize * (statvfs_result.f_bavail),
|
||||||
|
})
|
||||||
|
|
||||||
def get_device_facts(self):
|
def get_device_facts(self):
|
||||||
self.facts['devices'] = {}
|
self.facts['devices'] = {}
|
||||||
|
|
Loading…
Reference in a new issue