summaryrefslogtreecommitdiffstats
path: root/lib/garbage.sh
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2013-10-12 17:30:07 (EDT)
committer P. J. McDermott <pjm@nac.net>2013-10-12 17:30:07 (EDT)
commit7bda53cd534ee6b6604367cd4c2a45376d41c7df (patch)
treebe255dafe14235a8f413457d93d9f9377f78b1ec /lib/garbage.sh
parentbfc4c3c0570ae8ec99a2c01ef85627acacaf11ea (diff)
Replace ${opt_base_dir} with ${base_dir}.
Diffstat (limited to 'lib/garbage.sh')
-rw-r--r--lib/garbage.sh10
1 files changed, 5 insertions, 5 deletions
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}"
}