From 5edc7eb61f8fdc3eecfd0bce0c2bc0a391513aba Mon Sep 17 00:00:00 2001 From: vsidhart Date: Tue, 7 May 2024 17:24:18 +0530 Subject: [PATCH] Add absolute path to executables --- python3/py3_sure.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python3/py3_sure.py b/python3/py3_sure.py index 1324cd5..1791901 100644 --- a/python3/py3_sure.py +++ b/python3/py3_sure.py @@ -103,7 +103,7 @@ def argValidation(args): def showCommand(exec_mode_command): exec_mode_command = exec_mode_command+'\n' exec_mode_command = exec_mode_command.encode() - p = subprocess.Popen('viptela_cli'.format(args.username), shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + p = subprocess.Popen('/usr/sbin/viptela_cli'.format(args.username), shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) p.stdin.write(exec_mode_command) #passing command stdOutput,stdError = p.communicate() p.stdin.close() @@ -1611,11 +1611,11 @@ def criticalChecktwentythree(cedge_validvsmarts_info, controllers_info, cedge_ip #02:Check:vManage:Network Card type def warningChecktwo(): - eth_data = executeCommand("ifconfig | grep '^eth[0-9]'") + eth_data = executeCommand("/sbin/ifconfig | grep '^eth[0-9]'") eth_drivers = {} eth_data = [e for e in eth_data.split() if 'eth' in e] for eth in eth_data: - driver = executeCommand('ethtool -i {} | grep driver'.format(eth)) + driver = executeCommand('/usr/sbin/ethtool -i {} | grep driver'.format(eth)) if 'e1000' in driver.split()[1]: eth_drivers[eth] = driver.split()[1]