The curl command sometimes returns 504, since the
chacra repository isn't ready yet. That exit
status stops the rest of the script from running
instead of running through the loop for $TIME_LIMIT
and rerunning curl every $INTERVAL.
This fix
ensures the exit status is always true.
Signed-off-by: Ali Maredia <amaredia@redhat.com>
# poll shaman for up to 10 minutes
while [ "$SECONDS" -le "$TIME_LIMIT" ]
do
- SHAMAN_MIRROR=`curl --fail -L ${REPO_URL}`
+ SHAMAN_MIRROR=`curl --fail -L ${REPO_URL} || true`
if [[ ${SHAMAN_MIRROR} ]]; then
echo "Ceph debian lib repo exists in shaman"
REPO_FOUND=1