From 69b9e4d24a0efa73405bbe42f7e06b567bb1f60e Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sun, 17 Jan 2016 10:29:43 -0500 Subject: *_vardata(): Use non-exiting error() --- diff --git a/src/vardata.sh b/src/vardata.sh index 05c9cff..6a7e749 100644 --- a/src/vardata.sh +++ b/src/vardata.sh @@ -36,12 +36,14 @@ init_vardata() rand vardatadir="${tmpdir}/${PACKAGE}-$(printf '%010d' ${rand_x})" if ! mkdir "${vardatadir}"; then - error 2 "$(get_msg 'temp_mkdir_fail')" "${vardatadir}" + error "$(get_msg 'temp_mkdir_fail')" "${vardatadir}" + return 1 fi for dir in ${VARDATA_DIRS}; do if ! mkdir "${vardatadir}/${dir}"; then - error 2 "$(get_msg 'temp_mkdir_fail')" \ + error "$(get_msg 'temp_mkdir_fail')" \ "${vardatadir}/${dir}" + return 1 fi done @@ -54,12 +56,14 @@ fini_vardata() for dir in ${VARDATA_DIRS}; do if ! rmdir "${vardatadir}/${dir}"; then - error 2 "$(get_msg 'temp_rmdir_fail')" \ + error "$(get_msg 'temp_rmdir_fail')" \ "${vardatadir}/${dir}" + return 1 fi done if ! rmdir "${vardatadir}"; then - error 2 "$(get_msg 'temp_rmdir_fail')" "${vardatadir}" + error "$(get_msg 'temp_rmdir_fail')" "${vardatadir}" + return 1 fi return 0 -- cgit v0.9.1