From ee78d526aeae91ddfad0246958d27f63a9a9be24 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Evrard Date: Sat, 2 Dec 2017 15:45:19 +0000 Subject: [PATCH] Only use ethtool if present Else this would issue an error in gates, during the log step. Change-Id: I55b310e6def8873ed5739f5f5176b867bc89443d --- test-log-collect.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test-log-collect.sh b/test-log-collect.sh index c71199aa..f6272189 100755 --- a/test-log-collect.sh +++ b/test-log-collect.sh @@ -185,7 +185,11 @@ fi # Record the active interface configs for interface in $(ip -o link | awk -F':' '{print $2}'); do - ethtool -k ${interface} > "${WORKING_DIR}/logs/ethtool-${interface}-cfg.txt" + if which ethtool &> /dev/null; then + ethtool -k ${interface} > "${WORKING_DIR}/logs/ethtool-${interface}-cfg.txt" + else + echo "No ethtool available" | tee -a "${WORKING_DIR}/logs/no-ethtool.txt" + fi done # Compress the files gathered so that they do not take up too much space.