From 7bda53cd534ee6b6604367cd4c2a45376d41c7df Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sat, 12 Oct 2013 17:30:07 -0400 Subject: Replace ${opt_base_dir} with ${base_dir}. --- (limited to 'lib/garbage.sh') diff --git a/lib/garbage.sh b/lib/garbage.sh index d78c530..9f3bd33 100644 --- a/lib/garbage.sh +++ b/lib/garbage.sh @@ -34,7 +34,7 @@ collect_garbage() # it is supported by the GNU and BusyBox implementations of date. cur_time=$(date '+%s') - for garbage in "${opt_base_dir}/.db/garbage/"*; do + for garbage in "${base_dir}/.db/garbage/"*; do if [ ! -f "${garbage}" ]; then continue fi @@ -43,10 +43,10 @@ collect_garbage() break fi while read -r dirs file; do - rm -f "${opt_base_dir}/${file}" + rm -f "${base_dir}/${file}" while [ ${dirs} -gt 0 ]; do file="${file%/*}" - try_rmdir "${opt_base_dir}/${file}" + try_rmdir "${base_dir}/${file}" dirs=$(($dirs - 1)) done done <<-EOF @@ -66,6 +66,6 @@ mark_pool_garbage() time=$(date '+%s') time=$(($time + $conf_pool_gc_delay)) - mkdir -p "${opt_base_dir}/.db/garbage" - printf '2 %s\n' "${file}" >>"${opt_base_dir}/.db/garbage/${time}" + mkdir -p "${base_dir}/.db/garbage" + printf '2 %s\n' "${file}" >>"${base_dir}/.db/garbage/${time}" } -- cgit v0.9.1