summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/vardata.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/vardata.sh b/src/vardata.sh
index 768cdf7..05c9cff 100644
--- a/src/vardata.sh
+++ b/src/vardata.sh
@@ -48,6 +48,23 @@ init_vardata()
return 0
}
+fini_vardata()
+{
+ local dir=''
+
+ for dir in ${VARDATA_DIRS}; do
+ if ! rmdir "${vardatadir}/${dir}"; then
+ error 2 "$(get_msg 'temp_rmdir_fail')" \
+ "${vardatadir}/${dir}"
+ fi
+ done
+ if ! rmdir "${vardatadir}"; then
+ error 2 "$(get_msg 'temp_rmdir_fail')" "${vardatadir}"
+ fi
+
+ return 0
+}
+
get_vardata_dir()
{
local dir="${1}"