Index: trunk/docs/Changelog
===================================================================
--- trunk/docs/Changelog	(revision 486)
+++ trunk/docs/Changelog	(revision 487)
@@ -1,4 +1,5 @@
 4.1.0:
-	* fix safe_logger() - uses the logger utility with a non-posix option 
+	* fix call of self_check for exit on sigterm
+	* fix safe_logger() - uses the logger utility with a non-posix option
 	* fix missing reporting on shell expansion capability in --version
 	* fix missing error message on invalid list for skipchecksum
Index: trunk/src/samhain.c
===================================================================
--- trunk/src/samhain.c	(revision 486)
+++ trunk/src/samhain.c	(revision 487)
@@ -797,5 +797,11 @@
   /* --- Checksum of executable. ---
    */
-  (void) sh_unix_self_check();
+  {
+    volatile  int sig_store = sig_termfast;
+
+    sig_termfast = 0;
+    (void) sh_unix_self_check();
+    sig_termfast = sig_store;
+  }
 
 
Index: trunk/src/sh_unix.c
===================================================================
--- trunk/src/sh_unix.c	(revision 486)
+++ trunk/src/sh_unix.c	(revision 487)
@@ -969,9 +969,10 @@
 	     sh_tiger_hash (sh.exec.path, TIGER_FILE, TIGER_NOLIM, hashbuf, sizeof(hashbuf)), 
 	     KEY_LEN+1);
-  if (0 == sl_strncmp(sh.exec.hash, 
-		      newhash,
-		      KEY_LEN))
-    SL_RETURN((0), _("sh_unix_self_check"));
-
+  if (0 == sl_strncmp(sh.exec.hash, newhash, KEY_LEN))
+    {
+      sh_error_handle(SH_ERR_INFO, FIL__, __LINE__, 0, MSG_E_SUBGEN,
+		      _("Checksum ok"), _("sh_unix_self_check"));
+      SL_RETURN((0), _("sh_unix_self_check"));
+    }
  
   dlog(1, FIL__, __LINE__, 
Index: trunk/test/testhash.sh
===================================================================
--- trunk/test/testhash.sh	(revision 486)
+++ trunk/test/testhash.sh	(revision 487)
@@ -63,5 +63,5 @@
 	fi
 	#
-	${TOP_SRCDIR}/configure --enable-debug=gdb --quiet $TRUST --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$RCFILE --with-log-file=$LOGFILE --with-pid-file=$PW_DIR/.samhain_lock --with-data-file=$PW_DIR/.samhain_file --enable-db-reload '--enable-login-watch' '--enable-mounts-check' ${C_LOGFILE} '--enable-port-check' '--enable-suidcheck' '--enable-message-queue'
+	${TOP_SRCDIR}/configure --enable-debug=gdb --quiet $TRUST --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$RCFILE --with-log-file=$LOGFILE --with-pid-file=$PW_DIR/.samhain_lock --with-data-file=$PW_DIR/.samhain_file --enable-db-reload '--enable-login-watch' '--enable-mounts-check' ${C_LOGFILE} '--enable-port-check' '--enable-message-queue'
 	#
 	fail=0
