Commit a59784a5 by Boris Manojlovic

don't use full path to command instead use module.get_bin_path

parent 0f4cf8cb
......@@ -2179,13 +2179,16 @@ class AIXNetwork(GenericBsdIfconfigNetwork, Network):
self.parse_inet6_line(words, current_if, ips)
else:
self.parse_unknown_line(words, current_if, ips)
rc, out, err = module.run_command(['/usr/bin/uname', '-W'])
uname_path = module.get_bin_path('uname')
if uname_path:
rc, out, err = module.run_command([uname_path, '-W'])
# don't bother with wpars it does not work
# zero means not in wpar
if out.split()[0] == '0':
if current_if['macaddress'] == 'unknown' and re.match('^en', current_if['device']):
rc, out, err = module.run_command(['/usr/bin/entstat', current_if['device'] ])
entstat_path = module.get_bin_path('entstat')
if entstat_path:
rc, out, err = module.run_command([entstat_path, current_if['device'] ])
if rc != 0:
break
for line in out.split('\n'):
......@@ -2200,7 +2203,9 @@ class AIXNetwork(GenericBsdIfconfigNetwork, Network):
current_if['type'] = 'ether'
# device must have mtu attribute in ODM
if 'mtu' not in current_if:
rc, out, err = module.run_command(['/usr/sbin/lsattr','-El', current_if['device'] ])
lsattr_path = module.get_bin_path('lsattr')
if lsattr_path:
rc, out, err = module.run_command([lsattr_path,'-El', current_if['device'] ])
if rc != 0:
break
for line in out.split('\n'):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment