From 3eb71cafd2c5e5e140172608eabf29cdd25d43b3 Mon Sep 17 00:00:00 2001 From: LecygneNoir Date: Fri, 8 Mar 2019 07:36:46 +0100 Subject: [PATCH] Add more precise test for eventid when rollbacking, fix #7 --- rollback_module.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rollback_module.sh b/rollback_module.sh index b937132..7278c29 100755 --- a/rollback_module.sh +++ b/rollback_module.sh @@ -90,7 +90,8 @@ function rebuild_txt { echo "${eventArray[${index}]}" >> "${TXT}" for key in "${sorted[@]}"; do # We work only on key related to our current event - if [[ "${key}" == "${index}"* ]]; then + # We need to compare key to the event id in index, ie the first part of the key (see #7) + if [[ "${key/.*/}" == "${index}" ]]; then eventID="${index}" nodeID="$(awk -F'.' '{print $2}' <<< ${key})" type="$(awk -F'.' '{print $3}' <<< ${key})"