[Pkg-clamav-commits] [SCM] Debian repository for ClamAV branch, debian/unstable, updated. debian/0.95+dfsg-1-19-g13bc00a

Michael Tautschnig mt at debian.org
Fri Mar 27 12:26:41 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit c704b2a338e510d43c47d885224d92326b86c8c7
Author: Michael Tautschnig <mt at debian.org>
Date:   Fri Mar 27 12:11:35 2009 +0100

    Don't tamper with /var/run in postinst
    
    - moved the chown to init script
    
    Signed-off-by: Michael Tautschnig <mt at debian.org>

diff --git a/debian/changelog b/debian/changelog
index e936e5f..79ad3d9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,7 @@ clamav (0.95+dfsg-2) unstable; urgency=low
   * Improved debconf questions
   * Added Homepage: control field
   * Another watch file fix to rank upstreams rc lower than releases.
+  * Even more /var/run-on-tmpfs fixes.
 
   [ Stephen Gran ]
   * Lots of option handling fixups for clamav-milter
diff --git a/debian/clamav-base.postinst.in b/debian/clamav-base.postinst.in
index 9c500cc..361fe14 100644
--- a/debian/clamav-base.postinst.in
+++ b/debian/clamav-base.postinst.in
@@ -32,7 +32,6 @@ case "$1" in
   configure)
   
   DATABASEDIR=/var/lib/clamav
-  RUNDIR=/var/run/clamav
   LOGDIR=/var/log/clamav
   user=clamav
   
@@ -42,7 +41,6 @@ case "$1" in
         --disabled-password --disabled-login \
 	--shell /bin/false --group --home /var/lib/clamav clamav
     chown $user:$user $DATABASEDIR
-    chown $user:$user $RUNDIR
     chown $user:$user $LOGDIR
   else
     if [ -e '/etc/clamav/clamd.conf' ]; then # Upgrade - clamd.conf already there
@@ -66,12 +64,6 @@ case "$1" in
   if [ -n "$clamconf" ]; then 
     user="$(grep '^User ' $clamconf | awk '{print $2}')"
     [ -z "$user" ] && user=clamav # Old default config
-    run="$(grep '^PidFile ' $clamconf | awk '{print $2}')"
-    if [ -n "$run" ]; then
-      rundir=`dirname "$run"`
-    else
-      rundir="$RUNDIR"
-    fi
     data="$(grep '^DatabaseDirectory ' $clamconf | awk '{print $2}')"
     if [ -n "$data" ]; then
       datadir="$(dirname "${data}/.")"
@@ -85,16 +77,14 @@ case "$1" in
       logdir="$LOGDIR"
     fi
     
-    if [ "$rundir" = "$RUNDIR" ] && [ "$datadir" = "$DATABASEDIR" ] && [ "$logdir" = "$LOGDIR" ]; then
+    if [ "$datadir" = "$DATABASEDIR" ] && [ "$logdir" = "$LOGDIR" ]; then
       if [ "$user" = 'clamav' ]; then # Default config
 	[ ! -d $DATABASEDIR ] || chown $user:$user $DATABASEDIR || true
-	[ ! -d $RUNDIR ]      || chown $user:$user $RUNDIR      || true
 	[ ! -d $LOGDIR ]      || chown $user:$user $LOGDIR      || true
       fi
     fi
   else 
     [ ! -d $DATABASEDIR ] || chown $user:$user $DATABASEDIR || true
-    [ ! -d $RUNDIR ]      || chown $user:$user $RUNDIR      || true
     [ ! -d $LOGDIR ]      || chown $user:$user $LOGDIR      || true        
   fi
 
diff --git a/debian/clamav-daemon.init.in b/debian/clamav-daemon.init.in
index d910ced..330dbb0 100644
--- a/debian/clamav-daemon.init.in
+++ b/debian/clamav-daemon.init.in
@@ -67,6 +67,7 @@ make_dir $(dirname "$SUPERVISORPIDFILE")
 THEPIDFILE="`grep ^PidFile $CLAMAVCONF | awk '{print $2}'`"
 [ -n "$THEPIDFILE" ] || THEPIDFILE='/var/run/clamav/clamd.pid'
 make_dir $(dirname "$THEPIDFILE")
+chown $User $(dirname "$THEPIDFILE")
 
 if [ -f "$THEPIDFILE" ]; then
   CLAMDPID=`pidofproc -p $THEPIDFILE $DAEMON`
diff --git a/debian/clamav-milter.init.in b/debian/clamav-milter.init.in
index cd855d3..eb8b2f6 100644
--- a/debian/clamav-milter.init.in
+++ b/debian/clamav-milter.init.in
@@ -58,6 +58,7 @@ make_dir $(dirname "$SUPERVISORPIDFILE")
 THEPIDFILE="`grep ^PidFile $CLAMAVMILTERCONF | awk '{print $2}'`"
 [ -n "$THEPIDFILE" ] || THEPIDFILE='/var/run/clamav/clamav-milter.pid'
 make_dir $(dirname "$THEPIDFILE")
+chown $User $(dirname "$THEPIDFILE")
 
 if [ -f "$THEPIDFILE" ]; then
   CLAMDPID=`pidofproc -p $THEPIDFILE $DAEMON`

-- 
Debian repository for ClamAV



More information about the Pkg-clamav-commits mailing list