change fix to lookup path with get_bin_path

reviewable/pr18780/r1
Kristof Keppens 12 years ago
parent dc20d63919
commit f607ba09a4

@ -1641,16 +1641,8 @@ def run_setup(module):
# Look for the path to the facter and ohai binary and set
# the variable to that path.
facter_path = None
ohai_path = None
for dir in os.environ['PATH'].split(':'):
facter = os.path.join(dir, 'facter')
if os.path.exists(facter):
facter_path = facter
ohai = os.path.join(dir, 'ohai')
if os.path.exists(ohai):
ohai_path = ohai
facter_path = module.get_bin_path('facter')
ohai_path = module.get_bin_path('ohai')
# if facter is installed, and we can use --json because
# ruby-json is ALSO installed, include facter data in the JSON

Loading…
Cancel
Save