mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Merge pull request #15095 from thatch45/dmyerscough-develop
Merge #15055 with fixes
This commit is contained in:
commit
9c66053562
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user