Fix postupgrade reconfiguration bug.
[carnet-upgrade.git] / src / functions.sh
index 4620e8a..6d192dd 100644 (file)
@@ -763,7 +763,7 @@ restore_config () {
   # force reconfiguration at the end if package is not upgraded automatically
   if [ "$config_changed" -a "$cn_package" ]; then
      cn_version=$( dpkg -s "$cn_package" | awk '/^Version:/ {print $2}' )
-     post_upgrade "pkg $cn_package eq $cn_version && dpkg-reconfigure $cn_package"
+     post_upgrade "pkg $cn_package gt $cn_version || dpkg-reconfigure $cn_package"
   fi
 }
 
@@ -949,7 +949,7 @@ upgrade_amavis () {
   local conf
 
   # remove init script diversion before upgrade
-  if pkg amavisd-cn lt 3:2.4.2-4; then 
+  if pkg amavisd-cn lt 3:2.6.1-1; then 
     if [ -L /etc/init.d/amavis -a -f /etc/init.d/amavis.amavisd-new ]; then
       rm -vf /etc/init.d/amavis
       dpkg-divert --remove /etc/init.d/amavis