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

View file

@ -482,7 +482,8 @@ while [ "${i}" -lt "${no_sources}" ]; do
_techo "Removing ${remove} backup(s)..." _techo "Removing ${remove} backup(s)..."
pcmd ls -p1 "$ddir" | grep "^${INTERVAL}\..*/\$" | \ 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 i=0
while read to_remove; do while read to_remove; do