mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
_active_mounts_openbsd: unbreak output for special filesystems (#34057)
mount(8) output is a little bit different on OpenBSD between local and special or remote filesystems (e.g. tmpfs or nfs). These do not use a UUID nor a device. https://github.com/saltstack/salt/issues/34012
This commit is contained in:
parent
03955dc204
commit
afd7836711
@ -140,10 +140,10 @@ def _active_mounts_openbsd(ret):
|
||||
'''
|
||||
for line in __salt__['cmd.run_stdout']('mount -v').split('\n'):
|
||||
comps = re.sub(r"\s+", " ", line).split()
|
||||
nod = __salt__['cmd.run_stdout']('ls -l {0}'.format(comps[0]))
|
||||
nod = ' '.join(nod.split()).split(" ")
|
||||
parens = re.findall(r'\((.*?)\)', line, re.DOTALL)
|
||||
if len(parens) > 1:
|
||||
nod = __salt__['cmd.run_stdout']('ls -l {0}'.format(comps[0]))
|
||||
nod = ' '.join(nod.split()).split(" ")
|
||||
ret[comps[3]] = {'device': comps[0],
|
||||
'fstype': comps[5],
|
||||
'opts': _resolve_user_group_names(parens[1].split(", ")),
|
||||
@ -153,7 +153,7 @@ def _active_mounts_openbsd(ret):
|
||||
else:
|
||||
ret[comps[2]] = {'device': comps[0],
|
||||
'fstype': comps[4],
|
||||
'opts': _resolve_user_group_names(parens[1].split(", "))}
|
||||
'opts': _resolve_user_group_names(parens[0].split(", "))}
|
||||
return ret
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user