- # restore php.ini
- memtotal=$(awk '$1 == "MemTotal:" { print int($2/1024) }' /proc/meminfo)
- if [ $memtotal -gt 1024 ]; then
- memlimit=64
- elif [ $memtotal -ge 512 ]; then
- memlimit=32
- else
- memlimit=16
- fi
-
- if pkg php5-cn && pkg php5-cli lt 5.2.6.dfsg.1-1+lenny2; then
- config_new=$(copy_template /etc/php5/cli/php.ini)
- sed -i "s/^[[:space:]]*memory_limit[[:space:]]*=.*/memory_limit = ${memlimit}M/" $config_new
- sed -i "s/^[[:space:]]*post_max_size[[:space:]]*=.*/post_max_size = ${memlimit}M/" $config_new
- if restore_file /etc/php5/cli/php.ini $config_new; then
- postupgrade_reconfigure php5-cn
- fi
- rm -f $config_new
- fi
-
- if pkg php5-cn && pkg libapache2-mod-php5 lt 5.2.6.dfsg.1-1+lenny2; then
- config_new=$(copy_template /etc/php5/apache2/php.ini)
- sed -i "s/^[[:space:]]*memory_limit[[:space:]]*=.*/memory_limit = ${memlimit}M/" $config_new
- sed -i "s/^[[:space:]]*post_max_size[[:space:]]*=.*/post_max_size = ${memlimit}M/" $config_new
- if restore_file /etc/php5/apache2/php.ini $config_new; then
- postupgrade_reconfigure php5-cn
- fi
- rm -f $config_new
+ # dovecot won't start with these options
+ if pkg dovecot-cn && pkg dovecot-common lt 1:1.2.15-7; then
+ sed -i 's/^\( *\)\(sieve\(_storage\)\?=.*\)/\1#\2/' \
+ /etc/dovecot/dovecot.conf