Conditional mailman upgrade.
authorValentin Vidic <Valentin.Vidic@CARNet.hr>
Fri, 18 Oct 2013 10:41:32 +0000 (12:41 +0200)
committerValentin Vidic <Valentin.Vidic@CARNet.hr>
Fri, 18 Oct 2013 10:41:32 +0000 (12:41 +0200)
src/functions.sh

index 051b34c..0e12ecb 100644 (file)
@@ -1001,9 +1001,11 @@ upgrade_fail2ban() {
 # manual upgrade of mailman to avoid two copies of mailman running
 # first started by python upgrade and second started by mailman itself
 upgrade_mailman() {
 # manual upgrade of mailman to avoid two copies of mailman running
 # first started by python upgrade and second started by mailman itself
 upgrade_mailman() {
-  /etc/init.d/mailman stop || true
-  pkgadd python
-  pkgadd mailman mailman-cn
+  if pkg mailman-cn lt 2:2.1.15~cn0; then
+    /etc/init.d/mailman stop || true
+    pkgadd python
+    pkgadd mailman mailman-cn
+  fi
 }
 
 get_variable () {
 }
 
 get_variable () {