mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
make status.diskusage work on Solaris like platforms
This commit is contained in:
parent
a12b311a62
commit
3211538830
1 changed files with 15 additions and 5 deletions
|
@ -500,14 +500,23 @@ def diskusage(*args):
|
|||
ifile = salt.utils.fopen(procf, 'r').readlines()
|
||||
elif __grains__['kernel'] == 'FreeBSD':
|
||||
ifile = __salt__['cmd.run']('mount -p').splitlines()
|
||||
elif __grains__['kernel'] == 'SunOS':
|
||||
ifile = __salt__['cmd.run']('mount -p').splitlines()
|
||||
|
||||
for line in ifile:
|
||||
comps = line.split()
|
||||
if len(comps) >= 3:
|
||||
mntpt = comps[1]
|
||||
fstype = comps[2]
|
||||
if regex.match(fstype):
|
||||
selected.add(mntpt)
|
||||
if __grains__['kernel'] == 'SunOS':
|
||||
if len(comps) >= 4:
|
||||
mntpt = comps[2]
|
||||
fstype = comps[3]
|
||||
if regex.match(fstype):
|
||||
selected.add(mntpt)
|
||||
else:
|
||||
if len(comps) >= 3:
|
||||
mntpt = comps[1]
|
||||
fstype = comps[2]
|
||||
if regex.match(fstype):
|
||||
selected.add(mntpt)
|
||||
|
||||
# query the filesystems disk usage
|
||||
ret = {}
|
||||
|
@ -674,6 +683,7 @@ def netstats():
|
|||
|
||||
def netdev():
|
||||
'''
|
||||
..versionchanged:: 2016.3.2
|
||||
Return the network device stats for this minion
|
||||
|
||||
CLI Example:
|
||||
|
|
Loading…
Add table
Reference in a new issue