[Logcheck-commits] CVS logcheck/debian
CVS User eevans-guest
logcheck-devel@lists.alioth.debian.org
Sun, 16 May 2004 15:19:56 -0600
Update of /cvsroot/logcheck/logcheck/debian
In directory haydn:/tmp/cvs-serv18607
Modified Files:
logcheck.postinst logcheck.preinst
Log Message:
- #249324: Made creation of user and setting of permissions conditional on
upgrades from < 1.2.19
-- Eric Evans
--- /cvsroot/logcheck/logcheck/debian/logcheck.postinst 2004/05/09 23:57:05 1.10
+++ /cvsroot/logcheck/logcheck/debian/logcheck.postinst 2004/05/16 21:19:56 1.11
@@ -1,6 +1,6 @@
#!/bin/sh
-# $Id: logcheck.postinst,v 1.10 2004/05/09 23:57:05 ttroxell Exp $
+# $Id: logcheck.postinst,v 1.11 2004/05/16 21:19:56 eevans-guest Exp $
set -e
@@ -40,20 +40,22 @@
if [ "$2" = "" -a ! -f /etc/logcheck/header.txt ]; then
cp -p /usr/share/logcheck/header.txt /etc/logcheck
fi
- # Fix Permissions
- chown -R logcheck:logcheck /var/lib/logcheck || true
- chown -R logcheck:logcheck /var/state/logcheck &> /dev/null || true
- chgrp -R logcheck /etc/logcheck || true
- chmod 750 /etc/logcheck/ignore.d.paranoid || true
- chmod 750 /etc/logcheck/ignore.d.workstation || true
- chmod 750 /etc/logcheck/ignore.d.server || true
- chmod 750 /etc/logcheck/cracking.d || true
- chmod 750 /etc/logcheck/cracking.ignore.d || true
- chmod 750 /etc/logcheck/violations.d || true
- chmod 750 /etc/logcheck/violations.ignore.d || true
- chmod -R g+rX /etc/logcheck || true
- # just in case
- chown logcheck /var/lock/logcheck &> /dev/null || true
+ if dpkg --compare-versions "$2" lt 1.2.19; then
+ # Fix Permissions
+ chown -R logcheck:logcheck /var/lib/logcheck || true
+ chown -R logcheck:logcheck /var/state/logcheck &> /dev/null || true
+ chgrp -R logcheck /etc/logcheck || true
+ chmod 750 /etc/logcheck/ignore.d.paranoid || true
+ chmod 750 /etc/logcheck/ignore.d.workstation || true
+ chmod 750 /etc/logcheck/ignore.d.server || true
+ chmod 750 /etc/logcheck/cracking.d || true
+ chmod 750 /etc/logcheck/cracking.ignore.d || true
+ chmod 750 /etc/logcheck/violations.d || true
+ chmod 750 /etc/logcheck/violations.ignore.d || true
+ chmod -R g+rX /etc/logcheck || true
+ # just in case
+ chown logcheck /var/lock/logcheck &> /dev/null || true
+ fi
;;
--- /cvsroot/logcheck/logcheck/debian/logcheck.preinst 2004/05/06 06:12:02 1.4
+++ /cvsroot/logcheck/logcheck/debian/logcheck.preinst 2004/05/16 21:19:56 1.5
@@ -5,11 +5,6 @@
set -e
-deluser logcheck &>/dev/null || true
-adduser --quiet --system --no-create-home --group --home /var/lib/logcheck \
- logcheck || true
-adduser --quiet logcheck adm ||true
-
# summary of how this script can be called:
# * <new-preinst> `install'
# * <new-preinst> `install' <old-version>
@@ -21,6 +16,12 @@
case "$1" in
install|upgrade)
+ if dpkg --compare-versions "$2" lt 1.2.19; then
+ deluser logcheck &>/dev/null || true
+ adduser --quiet --system --no-create-home --group \
+ --home /var/lib/logcheck logcheck || true
+ adduser --quiet logcheck adm || true
+ fi
;;
abort-upgrade)
;;
@@ -37,5 +38,3 @@
#DEBHELPER#
exit 0
-
-