From 51ed0eda4a16dc4d4c27205a97247b04696aaba5 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sat, 27 Jul 2013 15:29:45 -0400 Subject: lib/garbage.sh: s/archive/opt_base_dir/. --- (limited to 'lib') diff --git a/lib/garbage.sh b/lib/garbage.sh index dcec7ed..d5e35cd 100644 --- a/lib/garbage.sh +++ b/lib/garbage.sh @@ -31,7 +31,7 @@ collect_garbage() # it is supported by the GNU and BusyBox implementations of date. cur_time=$(date '+%s') - for garbage in "${archive}/.db/garbage/"*; do + for garbage in "${opt_base_dir}/.db/garbage/"*; do if [ ! -f "${garbage}" ]; then continue fi @@ -40,10 +40,10 @@ collect_garbage() break fi while read -r dirs file; do - rm -f "${archive}/${file}" + rm -f "${opt_base_dir}/${file}" while [ ${dirs} -gt 0 ]; do file="${file%/*}" - try_rmdir "${archive}/${file}" + try_rmdir "${opt_base_dir}/${file}" dirs=$(($dirs - 1)) done done <<-EOF @@ -63,6 +63,6 @@ mark_pool_garbage() time=$(date '+%s') time=$(($time + $conf_pool_gc_delay)) - mkdir -p "${archive}/.db/garbage" - printf '2 %s\n' "${file}" >>"${archive}/.db/garbage/${time}" + mkdir -p "${opt_base_dir}/.db/garbage" + printf '2 %s\n' "${file}" >>"${opt_base_dir}/.db/garbage/${time}" } -- cgit v0.9.1