adjust ls for existing backups to new delete_from_file behaviour

Signed-off-by: Nico Schottelius <nico@ikn.schottelius.org>
This commit is contained in:
Nico Schottelius 2009-10-30 19:49:17 +01:00
parent 39e8eb4c94
commit 2a6ab4c125

View file

@ -457,9 +457,8 @@ while [ "${i}" -lt "${no_sources}" ]; do
# #
# Check: maximum number of backups is reached? # Check: maximum number of backups is reached?
# If so remove. Use grep and ls -p so we only look at directories
# #
count="$(pcmd ls -p1 "${ddir}" | grep "^${INTERVAL}\..*/\$" | wc -l \ count="$(pcmd ls -p1 "${ddir}/${INTERVAL}.*/" | wc -l \
| sed 's/^ *//g')" || _exit_err "Counting backups failed" | sed 's/^ *//g')" || _exit_err "Counting backups failed"
_techo "Existing backups: ${count} Total keeping backups: ${c_interval}" _techo "Existing backups: ${count} Total keeping backups: ${c_interval}"