diff --git a/salt/modules/mount.py b/salt/modules/mount.py index f6ac9d9f5c..31de128056 100644 --- a/salt/modules/mount.py +++ b/salt/modules/mount.py @@ -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)