[Logcheck-commits] r1449 - logcheck/trunk/debian

madduck at users.alioth.debian.org madduck at users.alioth.debian.org
Sun Jan 14 18:36:18 CET 2007


Author: madduck
Date: 2007-01-14 18:36:18 +0100 (Sun, 14 Jan 2007)
New Revision: 1449

Modified:
   logcheck/trunk/debian/changelog
   logcheck/trunk/debian/logcheck.postinst
Log:
* Check for existence of home directory of the system account. If it points
  to a non-existing directory, change it to /var/lib/logcheck.

Modified: logcheck/trunk/debian/changelog
===================================================================
--- logcheck/trunk/debian/changelog	2007-01-14 16:26:33 UTC (rev 1448)
+++ logcheck/trunk/debian/changelog	2007-01-14 17:36:18 UTC (rev 1449)
@@ -1,4 +1,4 @@
-logcheck (1.2.53~unreleased.6) unstable; urgency=low
+logcheck (1.2.53~unreleased.7) unstable; urgency=low
 
   * violations.ignore.d/logcheck-postfix: ignore entries for messages
     bounced/deferred by the LDA.
@@ -66,8 +66,11 @@
 
   * Modified the system account Gecos name to "logcheck system account".
 
- -- martin f. krafft <madduck at debian.org>  Sun, 14 Jan 2007 17:26:03 +0100
+  * Check for existence of home directory of the system account. If it points
+    to a non-existing directory, change it to /var/lib/logcheck.
 
+ -- martin f. krafft <madduck at debian.org>  Sun, 14 Jan 2007 17:36:22 +0100
+
 logcheck (1.2.52) unstable; urgency=low
 
   * ignore.d.server/dovecot: cleanup of dovecot filters to match some more

Modified: logcheck/trunk/debian/logcheck.postinst
===================================================================
--- logcheck/trunk/debian/logcheck.postinst	2007-01-14 16:26:33 UTC (rev 1448)
+++ logcheck/trunk/debian/logcheck.postinst	2007-01-14 17:36:18 UTC (rev 1449)
@@ -28,11 +28,16 @@
 	# check for logcheck user or bad version without home
 	# touch cron job on updating accounts to fix #284788
 	if ! getent passwd logcheck > /dev/null; then
-	  adduser --quiet --system --no-create-home --group logcheck ||true
+	  adduser --quiet --system --home /var/lib/logcheck --no-create-home \
+      --group logcheck ||true
 	  touch /etc/cron.d/logcheck || true
-    	elif dpkg --compare-versions "$2" eq 1.2.19; then
-	   usermod -d /var/lib/logcheck logcheck > /dev/null || true
 	fi
+
+  # make sure the home directory exists
+  if [ ! -d "$(getent passwd logcheck | cut -d: -f6)" ]; then
+    usermod -d /var/lib/logcheck logcheck > /dev/null || true
+  fi
+
 	# check for logcheck in adm group
 	if ! getent group adm | grep logcheck > /dev/null; then
 	  adduser --quiet logcheck adm || true




More information about the Logcheck-commits mailing list