[pve-devel] applied: [PATCH corosync-pve 1/2] ensure service start when upgrading from old versions

Fabian Grünbichler f.gruenbichler at proxmox.com
Wed Mar 8 11:48:46 CET 2017


Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---
try-restart does not restart if not running, so we need to do this once

 debian/corosync-pve.postinst | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/debian/corosync-pve.postinst b/debian/corosync-pve.postinst
index 3141a78..a0a30b1 100644
--- a/debian/corosync-pve.postinst
+++ b/debian/corosync-pve.postinst
@@ -14,6 +14,13 @@ case "$1" in
 	# create the ais user
         adduser --quiet --group --system --no-create-home ais
 
+	if [ -n "$2" ]; then
+	    # switch from stop-wait-start to restart requires a final manual start after upgrade
+	    if dpkg --compare-versions "$2" le "2.4.2-1" ; then
+		deb-systemd-invoke start corosync.service > /dev/null || true
+	    fi
+	fi
+
     ;;
 
     abort-upgrade|abort-remove|abort-deconfigure)
-- 
2.1.4





More information about the pve-devel mailing list