~ubuntu-branches/ubuntu/saucy/clamav/saucy-backports

« back to all changes in this revision

Viewing changes to debian/clamav-milter.postinst.in

  • Committer: Package Import Robot
  • Author(s): Scott Kitterman
  • Date: 2014-03-19 11:01:01 UTC
  • mfrom: (127.1.10 trusty-proposed)
  • Revision ID: package-import@ubuntu.com-20140319110101-7zmsh88kmyii2wca
Tags: 0.98.1+dfsg-4ubuntu1~ubuntu13.10.1
No-change backport to saucy (LP: #1292943)

Show diffs side-by-side

added added

removed removed

Lines of Context:
95
95
    db_metaget clamav-milter/MaxFileSize value || true
96
96
    maxfilesize="`echo $RET | sed -e s/M//g`"
97
97
    MaxFSize="${maxfilesize}M"
 
98
    db_metaget clamav-base/LogRotate value || true
 
99
    LogRotate="$RET"
 
100
    db_metaget clamav-milter/SupportMultipleRecipients value || true
 
101
    SupportMultipleRecipients="$RET"
98
102
 
99
103
    if [ -z "$logfile" ] || [ "$logfile" = 'none' ]; then
100
104
      logsyslog=true
107
111
    fi
108
112
 
109
113
    slurp_config "$CLAMAVMILTERCONF"
110
 
    
 
114
 
 
115
    # Test for the broken versions, see #741675.
 
116
    if [ "$2" = "0.98.1+dfsg-3" ] || [ "$2" = "0.98.1+dfsg-1+deb7u2" ] || [ "$2" = "0.98.1+dfsg-1+deb6u2" ]; then
 
117
      # Use the defaults instead of the bogus values created by that versions.
 
118
      db_metaget clamav-base/LogRotate default || true
 
119
      LogRotate="$RET"
 
120
      db_metaget clamav-milter/SupportMultipleRecipients default || true
 
121
      SupportMultipleRecipients="$RET"
 
122
    fi
 
123
 
111
124
    echo "#Automatically Generated by clamav-milter postinst" > $DEBCONFFILE
112
125
    echo "#To reconfigure clamav-milter run #dpkg-reconfigure clamav-milter" >> $DEBCONFFILE
113
126
    echo "#Please read /usr/share/doc/clamav-base/README.Debian.gz for details" >> $DEBCONFFILE
160
173
LogVerbose $logverbose
161
174
LogInfected $loginfected
162
175
LogClean $logclean
 
176
LogRotate $LogRotate
163
177
MaxFileSize $MaxFSize
 
178
SupportMultipleRecipients $SupportMultipleRecipients
164
179
EOF
165
180
    if [ -n "$SkipAuthenticated" ]; then
166
181
      cat >> $DEBCONFFILE << EOF
239
254
    if echo "$logfile" | grep -q '^/dev/'; then
240
255
      make_logrotate=false
241
256
    else
242
 
      make_logrotate=true
 
257
      if [ -n "$LogRotate" ]; then
 
258
        make_logrotate=true
 
259
      else
 
260
        make_logrotate=false
 
261
      fi
243
262
    fi
244
263
    [ -n "$user" ] || user=clamav
245
264
    if [ "$make_logrotate" = 'true' ]; then