Don't fail everything if one copy-logs command momentarily fails

Change-Id: I794bbf81a2080260f563caec3a778573a577212b
This commit is contained in:
David Moreau-Simard 2016-04-19 16:48:24 -04:00 committed by David Moreau Simard
parent f451f9aa5a
commit b6445bcda5
1 changed files with 2 additions and 1 deletions

View File

@ -61,7 +61,8 @@ function get_diag_commands {
for ((i = 0; i < ${#commands[@]}; i++)); do
# filenames have underscores instead of spaces or slashes
filename="$(echo "${commands[$i]}" |sed -e "s%[ \/]%_%g").txt"
$SUDO bash -c "${commands[$i]} 2>&1 > ${DIAG_LOGDIR}/${filename}"
# Run diagnostic commands but don't fail the whole thing if one command fails
$SUDO bash -c "${commands[$i]} 2>&1 > ${DIAG_LOGDIR}/${filename}" || true
done
}