From c1de6362982b7fcc6bf5a0b2715aa26a9a64394d Mon Sep 17 00:00:00 2001 From: Simon Paillard Date: Sun, 4 Dec 2011 22:26:47 +0100 Subject: hook(): mail on error --- etc/common | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/etc/common b/etc/common index 0fc319e..7f988f1 100644 --- a/etc/common +++ b/etc/common @@ -198,7 +198,11 @@ hook () { ${HOOKSCR} result=$? set -e - log "Back from hook $HOOKNR, got returncode ${result}" + if [ ${result} -ne 0 ] ; then + error "Back from hook $HOOKNR, got returncode ${result}" + else + log "Back from hook $HOOKNR, got returncode ${result}" + fi return $result else return 0 -- cgit v1.2.3