Commit b33d0ee9 authored by Per Jonsson's avatar Per Jonsson Committed by Per Cederqvist
Browse files

Implement the last change correctly.

parent 126d93dd
......@@ -18,6 +18,7 @@ retry=0
new=0
only_prune=0
only_clone=0
first_run=0
ss=/opt/LYSrdiff/bin/lysrdiff-set-status.py
......@@ -80,6 +81,10 @@ origin="$base"/origin
rdiffdir="$files/rdiff-backup-data"
incrementsdir="$rdiffdir/increments"
if [ ! -d "$files" ]
then
first_run=1
fi
mkdir -p "$files"
mkdir "$lockdir" || exit 1
......@@ -139,7 +144,7 @@ then
AGE=`cat "$age"`
fi
if [ -d "$files" ]
if [ $first_run = 1 ]
then
echo -ne "${CLR}${msg}: removing increments older than $AGE"
$ss --status $disk $part "${msg}: removing increments older than $AGE"
......@@ -150,6 +155,8 @@ then
--force \
-v 2 \
"$files" > "$rdiffcleanlogfile" 2>&1
else
touch "$rdiffcleanlogfile"
fi
fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment