use . as a seperator for marking, not directly in the dir, which will be removed anyway.
This commit is contained in:
parent
327e901527
commit
feea0661a7
1 changed files with 4 additions and 4 deletions
|
@ -14,7 +14,7 @@ CPREEXEC="${CDEFAULTS}/pre_exec"
|
||||||
CPOSTEXEC="${CDEFAULTS}/post_exec"
|
CPOSTEXEC="${CDEFAULTS}/post_exec"
|
||||||
|
|
||||||
TMP=$(mktemp "/tmp/$(basename $0).XXXXXX")
|
TMP=$(mktemp "/tmp/$(basename $0).XXXXXX")
|
||||||
VERSION=0.6.1
|
VERSION=0.6.2
|
||||||
RELEASE="2007-08-20"
|
RELEASE="2007-08-20"
|
||||||
HALF_VERSION="ccollect ${VERSION}"
|
HALF_VERSION="ccollect ${VERSION}"
|
||||||
FULL_VERSION="ccollect ${VERSION} (${RELEASE})"
|
FULL_VERSION="ccollect ${VERSION} (${RELEASE})"
|
||||||
|
@ -394,10 +394,10 @@ while [ "${i}" -lt "${no_sources}" ]; do
|
||||||
#
|
#
|
||||||
# Check for incomplete backups
|
# Check for incomplete backups
|
||||||
#
|
#
|
||||||
( cd "${c_dest}" 2>/dev/null && ls -1 "${INTERVAL}"*"/${c_marker}" > "${TMP}" 2>/dev/null)
|
( cd "${c_dest}" 2>/dev/null && ls -1 "${INTERVAL}"*".${c_marker}" > "${TMP}" 2>/dev/null)
|
||||||
|
|
||||||
while read incomplete; do
|
while read incomplete; do
|
||||||
realincomplete=$(echo ${incomplete} | sed "s/${c_marker}\$//")
|
realincomplete=$(echo ${incomplete} | sed "s/\\.${c_marker}\$//")
|
||||||
_techo "Incomplete backup: ${realincomplete}"
|
_techo "Incomplete backup: ${realincomplete}"
|
||||||
if [ "${DELETE_INCOMPLETE}" = "yes" ]; then
|
if [ "${DELETE_INCOMPLETE}" = "yes" ]; then
|
||||||
_techo "Deleting ${realincomplete} ..."
|
_techo "Deleting ${realincomplete} ..."
|
||||||
|
@ -422,7 +422,7 @@ while [ "${i}" -lt "${no_sources}" ]; do
|
||||||
_techo "Removing ${remove} backup(s)..."
|
_techo "Removing ${remove} backup(s)..."
|
||||||
|
|
||||||
( cd "${c_dest}" 2>/dev/null && ls -p1 | grep "^${INTERVAL}\..*/\$" | \
|
( cd "${c_dest}" 2>/dev/null && ls -p1 | grep "^${INTERVAL}\..*/\$" | \
|
||||||
sort -n | head -n "${remove}" > "${TMP}" )
|
sort -n | head -n "${remove}" ) > "${TMP}"
|
||||||
|
|
||||||
while read to_remove; do
|
while read to_remove; do
|
||||||
_techo "Removing ${to_remove} ..."
|
_techo "Removing ${to_remove} ..."
|
||||||
|
|
Loading…
Reference in a new issue