Skip to content

Commit

Permalink
mount: fix extra -t parameter
Browse files Browse the repository at this point in the history
If 'fstype' parameter is not set in Linux environments, salt will
build a mount command with an empty -t value, making the command
fail.
  • Loading branch information
aplanas authored and brejoc committed Mar 4, 2019
1 parent 07c510d commit 33374e5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion salt/modules/mount.py
Original file line number Diff line number Diff line change
Expand Up @@ -1218,7 +1218,8 @@ def mount(name, device, mkmnt=False, fstype='', opts='defaults', user=None, util
if fstype:
args += ' -v {0}'.format(fstype)
else:
args += ' -t {0}'.format(fstype)
if fstype:
args += ' -t {0}'.format(fstype)
cmd = 'mount {0} {1} {2} '.format(args, device, name)
out = __salt__['cmd.run_all'](cmd, runas=user, python_shell=False)
if out['retcode']:
Expand Down

0 comments on commit 33374e5

Please sign in to comment.