Skip to content

Commit

Permalink
_active_mounts_openbsd: unbreak output for special filesystems
Browse files Browse the repository at this point in the history
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.

saltstack#34012
  • Loading branch information
ajacoutot authored and rallytime committed Jun 20, 2016
1 parent 6f03d06 commit f7be5e1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions salt/modules/mount.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(", ")),
Expand All @@ -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


Expand Down

0 comments on commit f7be5e1

Please sign in to comment.