[Logcheck-commits] CVS logcheck/debian

CVS User jlps-guest logcheck-devel at lists.alioth.debian.org
Thu Feb 16 17:21:58 UTC 2006


Update of /cvsroot/logcheck/logcheck/debian
In directory haydn:/tmp/cvs-serv26669

Modified Files:
	logcheck.postinst 
Log Message:
Add logcheck to /etc/aliases


--- /cvsroot/logcheck/logcheck/debian/logcheck.postinst	2005/10/23 03:21:23	1.41
+++ /cvsroot/logcheck/logcheck/debian/logcheck.postinst	2006/02/16 17:21:57	1.42
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-# $Id: logcheck.postinst,v 1.41 2005/10/23 03:21:23 ttroxell Exp $
+# $Id: logcheck.postinst,v 1.42 2006/02/16 17:21:57 jlps-guest Exp $
 
 set -e
 
@@ -41,6 +41,18 @@
 	  adduser --quiet logcheck adm || true
 	fi  
 
+	# add logcheck to /etc/aliases
+	if [ -f /etc/aliases ] || [ -L /etc/aliases ]; then
+	    if ! grep -qi "^logcheck" /etc/aliases; then
+		echo "logcheck: root" >> /etc/aliases
+		newaliases=`which newaliases`
+		if [ $newaliases ] && [ -x $newaliases ]; then
+		    newaliases || true
+		fi
+	    fi
+	fi
+		
+
 	# Remove old directory on upgrade
 	if [ -n "$2" ] && dpkg --compare-versions "$2" lt "1.1.1-13.2"; then
 	    if [ -d /var/cache/logcheck ]; then
@@ -65,7 +77,7 @@
         fi
 
 	# need to be done on install and on upgrade for new rule files
-	# (Cant do this; breaks policy! -todd)
+	# (Can't do this; breaks policy! -todd)
 	# TODO: Get logcheck user in Debian base.
 	# chgrp -R logcheck /etc/logcheck || true
 



More information about the Logcheck-commits mailing list