From 70ecbee5044a1a5d4444a5c92736d1194fff88f6 Mon Sep 17 00:00:00 2001 From: Christoph Date: Tue, 27 Feb 2018 18:03:40 +0100 Subject: [PATCH] Remove also file '/etc/ld.so.conf.d/mysql.conf' if exists. --- remove_mariadb_installation.sh | 26 +++++++++++++++++++++++ remove_mysql_installation.sh | 25 ++++++++++++++++++++++ remove_percona_installation.sh | 38 +++++++++++++++++----------------- 3 files changed, 70 insertions(+), 19 deletions(-) diff --git a/remove_mariadb_installation.sh b/remove_mariadb_installation.sh index adc408b..571ec8a 100755 --- a/remove_mariadb_installation.sh +++ b/remove_mariadb_installation.sh @@ -229,6 +229,32 @@ fi echo "" +echononl " Remove '/etc/ld.so.conf.d/mysql.conf'.." +if [[ -f "/etc/ld.so.conf.d/mysql.conf" ]]; then + rm /etc/ld.so.conf.d/mysql.conf > $tmp_log_file 2>&1 + if [[ $? -ne 0 ]] ; then + echo_failed + error "$(cat $tmp_log_file)" + else + echo_ok + fi + + echononl " Run ldconfig - configure dynamic linker run-time bindings .." + ldconfig -V > $tmp_log_file 2>&1 + if [[ $? -ne 0 ]] ; then + echo_failed + error "$(cat $tmp_log_file)" + else + echo_ok + fi +else + echo_skipped +fi + + +echo "" + + _failed=false echononl " Remove MariaDB data directory" if $remove_data_dir ; then diff --git a/remove_mysql_installation.sh b/remove_mysql_installation.sh index 98e2b7a..899d14d 100755 --- a/remove_mysql_installation.sh +++ b/remove_mysql_installation.sh @@ -227,6 +227,31 @@ else fi +echo "" + +echononl " Remove '/etc/ld.so.conf.d/mysql.conf'.." +if [[ -f "/etc/ld.so.conf.d/mysql.conf" ]]; then + rm /etc/ld.so.conf.d/mysql.conf > $tmp_log_file 2>&1 + if [[ $? -ne 0 ]] ; then + echo_failed + error "$(cat $tmp_log_file)" + else + echo_ok + fi + + echononl " Run ldconfig - configure dynamic linker run-time bindings .." + ldconfig -V > $tmp_log_file 2>&1 + if [[ $? -ne 0 ]] ; then + echo_failed + error "$(cat $tmp_log_file)" + else + echo_ok + fi +else + echo_skipped +fi + + echo "" _failed=false diff --git a/remove_percona_installation.sh b/remove_percona_installation.sh index 9471a51..fb2088b 100755 --- a/remove_percona_installation.sh +++ b/remove_percona_installation.sh @@ -229,28 +229,28 @@ fi echo "" - echononl " Remove '/etc/ld.so.conf.d/mysql.conf'.." - if [[ -f "/etc/ld.so.conf.d/mysql.conf" ]]; then - rm /etc/ld.so.conf.d/mysql.conf > $tmp_log_file 2>&1 - if [[ $? -ne 0 ]] ; then - echo_failed - error "$(cat $tmp_log_file)" - else - echo_ok - fi - - echononl " Run ldconfig - configure dynamic linker run-time bindings .." - ldconfig -V > $tmp_log_file 2>&1 - if [[ $? -ne 0 ]] ; then - echo_failed - error "$(cat $tmp_log_file)" - else - echo_ok - fi +echononl " Remove '/etc/ld.so.conf.d/mysql.conf'.." +if [[ -f "/etc/ld.so.conf.d/mysql.conf" ]]; then + rm /etc/ld.so.conf.d/mysql.conf > $tmp_log_file 2>&1 + if [[ $? -ne 0 ]] ; then + echo_failed + error "$(cat $tmp_log_file)" else - echo_skipped + echo_ok fi + echononl " Run ldconfig - configure dynamic linker run-time bindings .." + ldconfig -V > $tmp_log_file 2>&1 + if [[ $? -ne 0 ]] ; then + echo_failed + error "$(cat $tmp_log_file)" + else + echo_ok + fi +else + echo_skipped +fi + echo ""