simply check for incomplete backups

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-01-15 01:54:55 +01:00
parent c10b46111b
commit 9cb8b99353

View file

@ -448,18 +448,14 @@ while [ "${source_no}" -lt "${no_sources}" ]; do
( pcmd cd "${ddir}" ) || _exit_err "Cannot change to ${ddir}. Skipping."
#
# Check: incomplete backups? (needs echo to remove newlines)
# Check incomplete backups (needs echo to remove newlines)
#
# *.marker: not possible, creates an error, if no *.marker exists
# -> catch return value
pcmd ls -d1 "${ddir}" | grep "${CMARKER}\$" > "${TMP}" ||\
_exit_err "Cannot list incomplete files"
pcmd ls -d1 "${ddir}/"*"${CMARKER}" > "${TMP}" 2>/dev/null; ret=$?
if [ "${ret}" -eq 0 ]; then
_techo "Incomplete backups: $(echo $(cat "${TMP}"))"
if [ -f "${c_delete_incomplete}" ]; then
delete_from_file "${TMP}" "${CMARKER}"
fi
_techo "Incomplete backups: $(echo $(cat "${TMP}"))"
if [ -f "${c_delete_incomplete}" ]; then
delete_from_file "${TMP}" "${CMARKER}"
fi
#