Commit 6928ca6d authored by Andreas Beckmann's avatar Andreas Beckmann
Browse files

mariadb-common.preinst: undo my.cnf symlink and my.cnf.old from the fallback

to prepare clean migration to a symlink managed with
/usr/share/mysql-common/configure-symlinks

the same code is part of mysql-common.preinst to ensure this cleanup is
performed by the first package being unpacked
parent cb74355b
...@@ -4,6 +4,7 @@ mariadb-10.0 (10.0.20-3) UNRELEASED; urgency=medium ...@@ -4,6 +4,7 @@ mariadb-10.0 (10.0.20-3) UNRELEASED; urgency=medium
* mariadb-common: Depend on a version of mysql-common that ships * mariadb-common: Depend on a version of mysql-common that ships
/usr/share/mysql-common/configure-symlinks. (Closes: #787533) /usr/share/mysql-common/configure-symlinks. (Closes: #787533)
* mariadb-common.postinst: Drop fallback my.cnf symlink management. * mariadb-common.postinst: Drop fallback my.cnf symlink management.
* mariadb-common.preinst: Clean up my.cnf/my.cnf.old from the fallback.
-- Andreas Beckmann <anbe@debian.org> Wed, 08 Jul 2015 09:09:58 +0200 -- Andreas Beckmann <anbe@debian.org> Wed, 08 Jul 2015 09:09:58 +0200
......
#!/bin/sh
set -e
if [ "$1" = "install" ] || [ "$1" = "upgrade" ]; then
if dpkg --compare-versions "$2" lt-nl "10.0.20-3~" ; then
# revert fallback my.cnf symlink setup performed by mariadb-common
# from 10.0.17-1~exp2 upto 10.0.20-2
if [ -L /etc/mysql/my.cnf ] && [ -f /etc/mysql/my.cnf.old ]; then
if [ "$(readlink /etc/mysql/my.cnf)" = "mariadb.cnf" ]; then
echo "Reverting my.cnf -> mariadb.cnf symlink setup by mariadb-common"
rm /etc/mysql/my.cnf
mv /etc/mysql/my.cnf.old /etc/mysql/my.cnf
fi
fi
fi
fi
#DEBHELPER#
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment