summaryrefslogtreecommitdiffstats
path: root/scripts/trex-cfg
diff options
context:
space:
mode:
authorYaroslav Brustinov <ybrustin@cisco.com>2016-12-20 11:01:52 +0200
committerYaroslav Brustinov <ybrustin@cisco.com>2016-12-20 11:01:52 +0200
commitde2af4eb20e9f77adfb1ee61e6ae3c82bfb86e92 (patch)
tree096cee00eba342fe98174905e5d8e948adf02da9 /scripts/trex-cfg
parent5741208336a7ff0262eefd82a80551cf37bf576a (diff)
Check OS version for Mellanox NICs; More detailed args error prints; 40G and Mellanox driver classes inherit from Base, not 10G.
Change-Id: I55f7833078ca9d7bfcda211ad165a656ce5014c5 Signed-off-by: Yaroslav Brustinov <ybrustin@cisco.com>
Diffstat (limited to 'scripts/trex-cfg')
-rwxr-xr-xscripts/trex-cfg14
1 files changed, 3 insertions, 11 deletions
diff --git a/scripts/trex-cfg b/scripts/trex-cfg
index c6f12a7e..08e1110f 100755
--- a/scripts/trex-cfg
+++ b/scripts/trex-cfg
@@ -4,7 +4,7 @@ if [ -f /etc/debian_version ]; then
OS=debian
elif [ -f /etc/redhat-release ]; then
OS=redhat
- systemctl stop firewalld.service
+ systemctl stop firewalld.service &> /dev/null
else
OS=unknown
fi
@@ -78,14 +78,6 @@ fi
# try to bind the ports from the configuration file (new DPDK)
PARENT_ARGS="$0 $@"
-if /usr/bin/python -V &> /dev/null; then
- ./dpdk_setup_ports.py --parent "$PARENT_ARGS"
-elif /usr/bin/python3 -V &> /dev/null; then
- /usr/bin/python3 dpdk_setup_ports.py --parent "$PARENT_ARGS"
-elif python -V &> /dev/null; then
- python ./dpdk_setup_ports.py --parent "$PARENT_ARGS"
-else
- echo "Could not find python to run dpdk_setup_ports.py script"
- exit 1
-fi
+source find_python.sh
+$PYTHON ./dpdk_setup_ports.py --parent "$PARENT_ARGS"