Merge pull request #15095 from thatch45/dmyerscough-develop

Merge #15055 with fixes
This commit is contained in:
Thomas S Hatch 2014-08-19 18:51:19 -06:00
commit 9c66053562

View File

@ -140,7 +140,7 @@ def mounted(name,
return ret
else:
ret['changes']['umount'] = "Forced remount because " \
+ "options changed"
+ "options changed"
remount_result = __salt__['mount.remount'](real_name, device, mkmnt=mkmnt, fstype=fstype, opts=opts)
ret['result'] = remount_result
return ret
@ -165,9 +165,20 @@ def mounted(name,
# The mount is not present! Mount it
if __opts__['test']:
ret['result'] = None
ret['comment'] = '{0} would be mounted'.format(name)
if os.path.exists(name):
ret['comment'] = '{0} would be mounted'.format(name)
else:
ret['comment'] = '{0} will be created and mounted'.format(name)
return ret
if not os.path.exists(name):
if mkmnt:
__salt__['file.mkdir'](name)
else:
ret['result'] = False
ret['comment'] = 'Mount directory is not present'
return ret
out = __salt__['mount.mount'](name, device, mkmnt, fstype, opts)
active = __salt__['mount.active']()
if isinstance(out, string_types):