]> git.proxmox.com Git - corosync-pve.git/blob - 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
1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
3 Date: Wed, 8 Mar 2017 14:08:04 +0100
4 Subject: [PATCH] add corosync-pve postinst for restart on dist-upgrade
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 Signed-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
15 diff --git a/debian/corosync-pve.postinst b/debian/corosync-pve.postinst
16 new file mode 100755
17 index 00000000..f282563f
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