mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
report umount because of different device
- Fails if the wrong device couldn't be unmounted - Reports unmounting the wrong device
This commit is contained in:
parent
320bc4f0d9
commit
c5e9347c65
@ -93,6 +93,12 @@ def mounted(name,
|
||||
# name matches but device doesn't - need to umount
|
||||
out = __salt__['mount.umount'](real_name)
|
||||
active = __salt__['mount.active']()
|
||||
if real_name in active:
|
||||
ret['comment'] = "Unable to unmount (mount point name matches but device doesn't)"
|
||||
ret['result'] = None
|
||||
return ret
|
||||
else:
|
||||
ret['changes']['umount'] = "Forced umount because mount point name matches but device doesn't"
|
||||
else:
|
||||
ret['comment'] = 'Target was already mounted'
|
||||
# using a duplicate check so I can catch the results of a umount
|
||||
|
Loading…
Reference in New Issue
Block a user