From c9c7b016205abcf7ca74ffa4cd6f1d2ea692a158 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Mon, 17 Jun 2013 17:01:35 -0400 Subject: [PATCH] now mount/unmount are searched for instead of hardcoded Signed-off-by: Brian Coca --- library/system/mount | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/library/system/mount b/library/system/mount index 485155cd4ec..384cd976079 100644 --- a/library/system/mount +++ b/library/system/mount @@ -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: @@ -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: