From 3127bab6d60a921ddf57a840fc2fad6611fffa17 Mon Sep 17 00:00:00 2001 From: Stephen Fromm Date: Thu, 30 May 2013 10:09:11 -0700 Subject: [PATCH] Use get_bin_path to find mkfs command (issue #2983) --- library/system/filesystem | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/library/system/filesystem b/library/system/filesystem index 5a78c1c394..b958f100e5 100755 --- a/library/system/filesystem +++ b/library/system/filesystem @@ -88,11 +88,12 @@ def main(): if module.check_mode: changed = True else: + mkfs = module.get_bin_path('mkfs', required=True) cmd = None if opts is None: - cmd = "mkfs -t %s '%s'"%(fstype, dev) + cmd = "%s -t %s '%s'" % (mkfs, fstype, dev) else: - cmd = "mkfs -t %s %s '%s'"%(fstype, opts, dev) + cmd = "%s -t %s %s '%s'" % (mkfs, fstype, opts, dev) rc,_,err = module.run_command(cmd) if rc == 0: changed = True