Signed-off-by: Joerg Jaspert <joerg@debian.org>
# If we error out this one is called, *FOLLOWED* by cleanup above
function onerror() {
ERRDATE=$(date "+%Y.%m.%d-%H:%M:%S")
- error=${ERR:-"false"}
subject="ATTENTION ATTENTION!"
if [ "${error}" = "false" ]; then
ARGS='GO[@]'
local "${!ARGS}"
+ error=${ERR:-"false"}
+
STAGEFILE="${stagedir}/${FUNC}"
if [ -f "${STAGEFILE}" ]; then
stamptime=$(/usr/bin/stat -c %Z "${STAGEFILE}")
exit 42
fi
- if [ "${ERR}" = "false" ]; then
+ if [ "${error}" = "false" ]; then
set +e
fi
${FUNC} ${ARGS}