Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

now mount/unmount binaries are searched for instead of hardcoded #3242

Merged
merged 1 commit into from
Jun 18, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 5 additions & 3 deletions library/system/mount
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,13 @@ def unset_mount(**kwargs):

def mount(module, **kwargs):
""" mount up a path or remount if needed """
mount_bin = module.get_bin_path('mount')

name = kwargs['name']
if os.path.ismount(name):
cmd = [ '/bin/mount', '-o', 'remount', name ]
cmd = [ mount_bin , '-o', 'remount', name ]
else:
cmd = [ '/bin/mount', name ]
cmd = [ mount_bin, name ]

rc, out, err = module.run_command(cmd)
if rc == 0:
Expand All @@ -213,8 +214,9 @@ def mount(module, **kwargs):
def umount(module, **kwargs):
""" unmount a path """

umount_bin = module.get_bin_path('umount')
name = kwargs['name']
cmd = ['/bin/umount', name]
cmd = [umount_bin, name]

rc, out, err = module.run_command(cmd)
if rc == 0:
Expand Down