mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Merge pull request #13428 from scentoni/fix-solaris-mount
Added mount.active functionality for Solaris.
This commit is contained in:
commit
7ba7a21868
@ -103,6 +103,18 @@ def _active_mounts_freebsd(ret):
|
||||
return ret
|
||||
|
||||
|
||||
def _active_mounts_solaris(ret):
|
||||
'''
|
||||
List active mounts on Solaris systems
|
||||
'''
|
||||
for line in __salt__['cmd.run_stdout']('mount -v').split('\n'):
|
||||
comps = re.sub(r"\s+", " ", line).split()
|
||||
ret[comps[2]] = {'device': comps[0],
|
||||
'fstype': comps[4],
|
||||
'opts': comps[5].split(',')}
|
||||
return ret
|
||||
|
||||
|
||||
def active():
|
||||
'''
|
||||
List the active mounts.
|
||||
@ -116,6 +128,8 @@ def active():
|
||||
ret = {}
|
||||
if __grains__['os'] == 'FreeBSD':
|
||||
_active_mounts_freebsd(ret)
|
||||
elif __grains__['os'] == 'Solaris':
|
||||
_active_mounts_solaris(ret)
|
||||
else:
|
||||
try:
|
||||
_active_mountinfo(ret)
|
||||
|
Loading…
Reference in New Issue
Block a user