corosync/0008-bsc#1083561-upgrade-from-1-x-y.patch
Bin Liu 75e953789d Accepting request 598458 from home:BinLiu:branches:network:ha-clustering:Factory
- corosync-2.4.4 is available now(bsc#1089836)
      man:fix in corosync-qdevice.8
      quorumtool: remove duplicated help message
      cfg: nodeid should be unsigned int
      coroparse: Use readdir instead of readdir_r
      wd: fix snprintf warnings
      Fix compile errors in qdevice on FreeBSD
      qdevice: mv free(str) after port validation
      Fix various typos
      Fix typo: recomended -> recommended
      man: support SOURCE_DATE_EPOCH
      configure: add --with-initconfigdir option
      Use static case blocks to determine distro flavor
      Use RuntimeDirectory instead of tmpfiles.d
      coroparse: Do not convert empty uid, gid to 0
      sam: Fix snprintf compiler warnings
      quorumtool: Use full buffer size in snprintf
      man: Add note about qdevice parallel cmds start
      sync: Remove unneeded determine sync code
      sync: Call sync_init of all services at once
      corosync.conf: publicize nodelist.node.name
      totemudp[u]: Drop truncated packets on receive
      logging: Make blackbox configurable
      logging: Close before and open blackbox after fork
      init: Quote subshell result properly
      blackbox: Quote subshell result properly
      qdevice: quote certutils scripts properly
      sam_test_agent: Remove unused assignment
      qdevice: Fix NULL pointer dereference
      quorumtool: Don't set our_flags without v_handle

OBS-URL: https://build.opensuse.org/request/show/598458
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/corosync?expand=0&rev=143
2018-04-19 09:12:27 +00:00

38 lines
1.0 KiB
Diff

From 374895340ebaa41bee26a2c2272bc9e3906ede22 Mon Sep 17 00:00:00 2001
From: Bin Liu <bliu@suse.com>
Date: Thu, 8 Mar 2018 13:34:54 +0800
Subject: [PATCH] add init-upgrade.patch
---
init/upgrade.sh | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
create mode 100644 init/upgrade.sh
diff --git a/init/upgrade.sh b/init/upgrade.sh
new file mode 100644
index 00000000..774aece9
--- /dev/null
+++ b/init/upgrade.sh
@@ -0,0 +1,18 @@
+#! /bin/bash
+CONFIG_FILE=/etc/corosync/corosync.conf
+CONFIG_FILE_OLD=/etc/corosync/corosync.conf.old
+
+if [ -f $CONFIG_FILE ]; then
+ cp $CONFIG_FILE $CONFIG_FILE_OLD
+ #lots of operations
+ sed -i "/amf\ *{/,/\ *}/d" $CONFIG_FILE && \
+ sed -i "/aisexec\ *{/,/\ *}/d" $CONFIG_FILE && \
+ sed -i "/service\ *{/,/\ *}/d" $CONFIG_FILE && \
+ #sed -i "/token:/,/max_messages:/d" $CONFIG_FILE && \
+ sed -i "s/AMF/QUORUM/g" $CONFIG_FILE
+ if [ $? -ne 0 ]; then
+ cp $CONFIG_FILE_OLD $CONFIG_FILE
+ else
+ rm $CONFIG_FILE_OLD
+ fi
+fi
--
2.13.6