Only make 1 retry when mounting nfs, to avoid freezing f rever.

urs
This commit is contained in:
Rob Pearce 2020-08-25 18:45:16 +10:00
parent f7af0de9f5
commit 62cc31ca1e
1 changed files with 5 additions and 5 deletions

10
bare.sh
View File

@ -465,7 +465,7 @@ for f in $REPOSTOBACKUP; do
if [[ $? -ne 0 ]]; then
# try mounting it.
mkdir -p $DATAPATH
mount -t nfs ${NFSPATH} ${DATAPATH} >/dev/null
mount_nfs -R 1 ${NFSPATH} ${DATAPATH} >/dev/null
if [[ $? -eq 0 ]]; then
log "Mount nfs volume '$NFSPATH' to $DATAPATH: success"
else
@ -600,10 +600,10 @@ for f in $REPOSTOBACKUP; do
list="RSYNC_OPTIONS"
fi
for f in $list; do
eval val='$'$f
for xx in $list; do
eval val='$'$xx
if [[ -z $val ]]; then
echo "Error - \$$f not set. Please update ${RCFILE}."
echo "Error - \$$xx not set. Please update ${RCFILE}."
echo ""
usage-rc
exit 1
@ -658,7 +658,7 @@ for f in $REPOSTOBACKUP; do
echo "OK: Last backup for '$REPO' succeeded on $humanstamp."
rv=0
else
echo "CRITICAL: Last backup for '$REPO' succeeded on $humanstamp (not in last 24 hours)."
echo "CRITICAL: Last backup for '$REPO' succeeded on $humanstamp (age $age not in last 24 hours)."
errcount=$(( $errcount + 1))
rv=2
fi