Only use ethtool if present
Else this would issue an error in gates, during the log step. Change-Id: I55b310e6def8873ed5739f5f5176b867bc89443d
This commit is contained in:
parent
8fc92038f1
commit
ee78d526ae
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user