From 5a9211e996f62750596b95a87f48bebb233cf696 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Mon, 07 Dec 2015 12:46:19 -0500 Subject: fini_vardata(): New function --- 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}" -- cgit v0.9.1