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