From f98853379ee8a55e112f6111454539353749a688 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 1 Nov 2009 15:28:33 +0100 Subject: [PATCH] also move the interval check further to the beginning Signed-off-by: Nico Schottelius --- ccollect.sh | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/ccollect.sh b/ccollect.sh index 4e04bde..8ef2183 100755 --- a/ccollect.sh +++ b/ccollect.sh @@ -324,6 +324,19 @@ while [ "${source_no}" -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 + # # Sort by ctime (default) or mtime (configuration option) # @@ -446,19 +459,6 @@ while [ "${source_no}" -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 - # # Check: maximum number of backups is reached? #