From a4b2a213cf97aa893269edacfb8bc4019bde966f Mon Sep 17 00:00:00 2001 From: Andrzej Religa Date: Fri, 20 Mar 2020 07:03:54 -0400 Subject: [PATCH] BUG#31029334 ROUTER DATAFILES ARE BY DEFAULT KEPT IN NON-PERSISTENT DIR IF INSTALLED FROM DEB Post push fix. RB: 24073 --- packaging/deb-in/mysql-router-packagesource.postinst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packaging/deb-in/mysql-router-packagesource.postinst b/packaging/deb-in/mysql-router-packagesource.postinst index b54949e41364..ff0cbef2871b 100644 --- a/packaging/deb-in/mysql-router-packagesource.postinst +++ b/packaging/deb-in/mysql-router-packagesource.postinst @@ -37,8 +37,11 @@ fix_datadir_path() { return 0 fi + # we don't want the grep not being able to find the pattern to fail the script + set +e has_invalid_keyring_path=$(grep "^keyring_path=$INVALID_DATA_DIR/keyring$" $CONFIGFILE) has_invalid_statefile_path=$(grep "^dynamic_state=$INVALID_DATA_DIR/state.json$" $CONFIGFILE) + set -e if [ -z "$has_invalid_keyring_path" ] && [ -z "$has_invalid_statefile_path" ]; then return 0