fix selecting removal backups code

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-01-15 02:44:37 +01:00
parent 7b65687da5
commit d04972026f

View file

@ -445,7 +445,7 @@ while [ "${source_no}" -lt "${no_sources}" ]; do
remove="$((${count} - ${c_interval} + 1))" remove="$((${count} - ${c_interval} + 1))"
_techo "Removing ${remove} backup(s)..." _techo "Removing ${remove} backup(s)..."
ls -${TSORT}d1r | grep "${INTERVAL}\\." | head -n "${remove}" > "${TMP}" || \ ls -${TSORT}1r | grep "^${INTERVAL}\\." | head -n "${remove}" > "${TMP}" || \
_exit_err "Listing old backups failed" _exit_err "Listing old backups failed"
delete_from_file "${TMP}" delete_from_file "${TMP}"