Move "interval definition section".

The interval definition section was down to just before the
maximum backup check.  This makes the code more friendly to
automatic interval selection.  Auto interval selection needs to
have ddir defined first and it is best if it is done after
delete_incomplete.  This change accomplishes that while still
placing it before the maximum backup check which needs to know
the interval.
This commit is contained in:
jll2 2009-06-26 15:22:09 -07:00
parent 72830a4647
commit 6fd22b6416

View file

@ -332,19 +332,6 @@ while [ "${i}" -lt "${no_sources}" ]; do
fi
fi
#
# interval definition: First try source specific, fallback to default
#
c_interval="$(cat "${backup}/intervals/${INTERVAL}" 2>/dev/null)"
if [ -z "${c_interval}" ]; then
c_interval="$(cat "${CDEFAULTS}/intervals/${INTERVAL}" 2>/dev/null)"
if [ -z "${c_interval}" ]; then
_exit_err "No definition for interval \"${INTERVAL}\" found. Skipping."
fi
fi
#
# Source checks
#
@ -464,6 +451,19 @@ while [ "${i}" -lt "${no_sources}" ]; do
fi
done
#
# interval definition: First try source specific, fallback to default
#
c_interval="$(cat "${backup}/intervals/${INTERVAL}" 2>/dev/null)"
if [ -z "${c_interval}" ]; then
c_interval="$(cat "${CDEFAULTS}/intervals/${INTERVAL}" 2>/dev/null)"
if [ -z "${c_interval}" ]; then
_exit_err "No definition for interval \"${INTERVAL}\" found. Skipping."
fi
fi
#
# check if maximum number of backups is reached, if so remove
# use grep and ls -p so we only look at directories