rewrite get incomplete backups code
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
parent
05de81e0f0
commit
4675bf864c
1 changed files with 6 additions and 5 deletions
11
ccollect
11
ccollect
|
@ -425,12 +425,13 @@ while [ "${source_no}" -lt "${no_sources}" ]; do
|
||||||
#
|
#
|
||||||
# Check incomplete backups (needs echo to remove newlines)
|
# Check incomplete backups (needs echo to remove newlines)
|
||||||
#
|
#
|
||||||
ls -1 | grep "${CMARKER}\$" > "${TMP}" || \
|
ls -1 | grep "${CMARKER}\$" > "${TMP}"; ret=$?
|
||||||
_exit_err "Cannot list incomplete files"
|
|
||||||
|
|
||||||
_techo "Incomplete backups: $(echo $(cat "${TMP}"))"
|
if [ "$ret" -eq 0 ]; then
|
||||||
if [ -f "${c_delete_incomplete}" ]; then
|
_techo "Incomplete backups: $(echo $(cat "${TMP}"))"
|
||||||
delete_from_file "${TMP}" "${CMARKER}"
|
if [ -f "${c_delete_incomplete}" ]; then
|
||||||
|
delete_from_file "${TMP}" "${CMARKER}"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in a new issue