Revert "Remove CM_ONESHOT-specific logic in flock failure checks"

This reverts commit 728d242d3c.
This commit is contained in:
Chris Down 2018-02-20 10:07:58 +00:00
parent a85f8998b4
commit 6825c302dc

View file

@ -142,8 +142,14 @@ while true; do
fi
if ! flock -x -w "$lock_timeout" "$lock_fd"; then
printf 'ERROR: %s\n' 'Timed out waiting for lock' >&2
exit 1
if (( CM_ONESHOT )); then
printf 'ERROR: %s\n' 'Timed out waiting for lock' >&2
exit 1
else
printf 'ERROR: %s\n' \
'Timed out waiting for lock, skipping this run' >&2
continue
fi
fi
for selection in "${cm_selections[@]}"; do