]> git.proxmox.com Git - corosync-pve.git/blame - patches/0005-add-corosync-pve-postinst-for-restart-on-dist-upgrad.patch
rebase and re-format patches
[corosync-pve.git] / patches / 0005-add-corosync-pve-postinst-for-restart-on-dist-upgrad.patch
CommitLineData
e17b446b 1From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2a8fc658
FG
2From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
3Date: Wed, 8 Mar 2017 14:08:04 +0100
e17b446b 4Subject: [PATCH] add corosync-pve postinst for restart on dist-upgrade
2a8fc658
FG
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
10---
11 debian/corosync-pve.postinst | 12 ++++++++++++
12 1 file changed, 12 insertions(+)
13 create mode 100755 debian/corosync-pve.postinst
14
15diff --git a/debian/corosync-pve.postinst b/debian/corosync-pve.postinst
16new file mode 100755
e17b446b 17index 00000000..f282563f
2a8fc658
FG
18--- /dev/null
19+++ b/debian/corosync-pve.postinst
20@@ -0,0 +1,12 @@
21+#!/bin/sh
22+
23+set -e
24+
25+if [ "$1" = "configure" ]; then
26+ if [ -n "$2" ]; then
27+ # switching package name from corosync-pve to corosync requires a manual restart on upgrade, once
28+ if dpkg --compare-versions "$2" lt "2.4.2-pve1" ; then
29+ deb-systemd-invoke try-restart corosync.service > /dev/null || true
30+ fi
31+ fi
32+fi