summaryrefslogtreecommitdiff
path: root/support-files/rpm/server-preun.sh
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2012-05-25 19:18:29 +0200
committerSergei Golubchik <sergii@pisem.net>2012-05-25 19:18:29 +0200
commitbe0d1179a87298a6ffc02e55a12e8e3a38d1e3c8 (patch)
treee7adb09daa8cd8309833643491694d6e99499bf5 /support-files/rpm/server-preun.sh
parent01a364a0ca31e80a5946597b6fccd96ff2fa723a (diff)
downloadmariadb-git-be0d1179a87298a6ffc02e55a12e8e3a38d1e3c8.tar.gz
create a new MariaDB-common.rpm that contains files needed both by the client and the server.
use my.cnf includes to split one big my.cnf file in server and client parts. remove "Provides: mysql-libs" (doesn't help on CentOS 6)
Diffstat (limited to 'support-files/rpm/server-preun.sh')
-rw-r--r--support-files/rpm/server-preun.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/support-files/rpm/server-preun.sh b/support-files/rpm/server-preun.sh
new file mode 100644
index 00000000000..182be27f1ec
--- /dev/null
+++ b/support-files/rpm/server-preun.sh
@@ -0,0 +1,14 @@
+if [ $1 = 0 ] ; then
+ # Stop MySQL before uninstalling it
+ if [ -x %{_sysconfdir}/init.d/mysql ] ; then
+ %{_sysconfdir}/init.d/mysql stop > /dev/null
+ # Don't start it automatically anymore
+ if [ -x /sbin/chkconfig ] ; then
+ /sbin/chkconfig --del mysql
+ fi
+ fi
+fi
+
+# We do not remove the mysql user since it may still own a lot of
+# database files.
+