forked from pool/corosync
- [Build 489.1] Corosync is not working after upgrade from sle11sp4-ha to sle15-ha(bsc#1083561) Added: 0016-bsc#1083561-upgrade-from-1-x-y.patch OBS-URL: https://build.opensuse.org/request/show/584183 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/corosync?expand=0&rev=137
38 lines
1.0 KiB
Diff
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
|
|
|