From 96171314d78a473a1cc0956987f1272ae16c9b93 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 17 Mar 2008 12:09:30 +0100 Subject: [PATCH] add error detection to backup listing --- ccollect.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ccollect.sh b/ccollect.sh index 5cfe168..31ea2a8 100755 --- a/ccollect.sh +++ b/ccollect.sh @@ -482,7 +482,8 @@ while [ "${i}" -lt "${no_sources}" ]; do _techo "Removing ${remove} backup(s)..." pcmd ls -p1 "$ddir" | grep "^${INTERVAL}\..*/\$" | \ - sort -n | head -n "${remove}" > "${TMP}" + sort -n | head -n "${remove}" > "${TMP}" || \ + _exit_err "Listing old backups failed" i=0 while read to_remove; do