From 2f4f3bcfd6c4ce48ad29dfa4dc801bc70fb8fb3e Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 24 Feb 2020 16:59:09 +0100 Subject: [SSUS] Don't reinstall mariadb every time The loop that uninstalls older versions didn't properly ignore the mariadb-server-core- package belonging to the desired version. It only ignored mariadb-server-, but uninstalling the core package would obviously also remove the whole server version we actually want. --- satellit_upgrader/updater.template.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/satellit_upgrader/updater.template.sh b/satellit_upgrader/updater.template.sh index 7a832ca..9de22c7 100644 --- a/satellit_upgrader/updater.template.sh +++ b/satellit_upgrader/updater.template.sh @@ -276,7 +276,7 @@ aptinst php-soap # MySQL... for ver in $( dpkg-query -W -f='${Package}\n' "mysql-server-*" "mariadb-server-*" ); do - [ "$ver" = "mariadb-server-$mysql" ] && continue + [[ "$ver" == *"-$mysql" ]] && continue dpkg -l "$ver" 2> /dev/null | grep -q '^ii' && apt remove -y "$ver" done aptinst default-mysql-server -- cgit v1.2.3-55-g7522