From 4ffb5f065ba66c36d06c1b7da5767e1cb5679bdc Mon Sep 17 00:00:00 2001 From: Robert Osowiecki Date: Thu, 30 Apr 2015 17:50:07 +0200 Subject: [PATCH] Using get_bin_path to find rmmod and modprobe --- system/modprobe.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/modprobe.py b/system/modprobe.py index 50c8f72fb2a..af845ae8cf5 100644 --- a/system/modprobe.py +++ b/system/modprobe.py @@ -97,13 +97,13 @@ def main(): # Add/remove module as needed if args['state'] == 'present': if not present: - rc, _, err = module.run_command(['modprobe', args['name'], args['params']]) + rc, _, err = module.run_command([module.get_bin_path('modprobe', True), args['name'], args['params']]) if rc != 0: module.fail_json(msg=err, **args) args['changed'] = True elif args['state'] == 'absent': if present: - rc, _, err = module.run_command(['rmmod', args['name']]) + rc, _, err = module.run_command([module.get_bin_path('rmmod', True), args['name']]) if rc != 0: module.fail_json(msg=err, **args) args['changed'] = True