runner: Address all shellcheck findings (#1854)

I am about to revisit #1517, #1454, #1561, and #1560 as a part of our on-going effort for a major enhancement to the runner entrypoints being made in #1759.

This change updates and reintroduces #1517 contributed by @CASABECI in a way it becomes applicable to today's code-base.
This commit is contained in:
Yusuke Kuoka
2022-10-04 20:30:27 +09:00
committed by GitHub
parent 35af24cf03
commit 2dd13b4a19
2 changed files with 10 additions and 7 deletions

View File

@@ -54,8 +54,7 @@ log.debug 'Waiting for processes to be running...'
processes=(dockerd)
for process in "${processes[@]}"; do
wait_for_process "$process"
if [ $? -ne 0 ]; then
if ! wait_for_process "$process"; then
log.error "$process is not running after max time"
dump /var/log/dockerd.err.log 'Dumping {path} to aid investigation'
dump /var/log/supervisor/supervisord.log 'Dumping {path} to aid investigation'
@@ -66,7 +65,7 @@ for process in "${processes[@]}"; do
done
if [ -n "${MTU}" ]; then
sudo ifconfig docker0 mtu ${MTU} up
sudo ifconfig docker0 mtu "${MTU}" up
fi
# Wait processes to be running