add error detection to backup listing

This commit is contained in:
Nico Schottelius 2008-03-17 12:09:30 +01:00
parent 4e47c881fb
commit 96171314d7
1 changed files with 2 additions and 1 deletions

View File

@ -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