X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=config%2Fdebian%2Fcron.dinstall;h=a7d901af09e47b4030c6ca79a7613bc4407be508;hb=85569c95d888b1ad94338f2326faabf6e22bcd8a;hp=09415bea865fb7d0a194317393086ad4db182b3f;hpb=d3e7dbdd0037ccbcb4789365cbca67de06bce5fa;p=dak.git diff --git a/config/debian/cron.dinstall b/config/debian/cron.dinstall index 09415bea..a7d901af 100755 --- a/config/debian/cron.dinstall +++ b/config/debian/cron.dinstall @@ -58,7 +58,6 @@ function cleanup() { # 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 @@ -457,6 +456,8 @@ function stage() { ARGS='GO[@]' local "${!ARGS}" + error=${ERR:-"false"} + STAGEFILE="${stagedir}/${FUNC}" if [ -f "${STAGEFILE}" ]; then stamptime=$(/usr/bin/stat -c %Z "${STAGEFILE}") @@ -486,7 +487,7 @@ function stage() { exit 42 fi - if [ "${ERR}" = "false" ]; then + if [ "${error}" = "false" ]; then set +e fi ${FUNC} ${ARGS}