summaryrefslogtreecommitdiff
path: root/support-files
diff options
context:
space:
mode:
authorunknown <lenz@mysql.com>2003-02-11 12:27:53 +0100
committerunknown <lenz@mysql.com>2003-02-11 12:27:53 +0100
commitb16e8d58f1e751400ecc2888796514355d791cfd (patch)
tree0c9b6c6828c724bc7cde267420ac5d8ac38e8139 /support-files
parentee189173cbd26b80bfa1236473f954f49680f2fc (diff)
downloadmariadb-git-b16e8d58f1e751400ecc2888796514355d791cfd.tar.gz
(please merge into 4.1 and onwards)
- re-added missing pre- and post(un)install scripts to server subpackage - added config file /etc/my.cnf to the file list (just for completeness) - make sure to create the datadir with 755 permissions support-files/mysql.spec.sh: - re-added missing pre- and post(un)install scripts to server subpackage - added config file /etc/my.cnf to the file list (just for completeness) - make sure to create the datadir with 755 permissions
Diffstat (limited to 'support-files')
-rw-r--r--support-files/mysql.spec.sh24
1 files changed, 18 insertions, 6 deletions
diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh
index 040bbbae306..34f4a919395 100644
--- a/support-files/mysql.spec.sh
+++ b/support-files/mysql.spec.sh
@@ -322,7 +322,11 @@ install -m755 $MBD/support-files/mysql.server $RBR/etc/init.d/mysql
# (safe_mysqld will be gone in MySQL 4.1)
ln -sf ./mysqld_safe $RBR/usr/bin/safe_mysqld
-%pre
+# Touch the place where the my.cnf config file might be located
+# Just to make sure it's in the file list and marked as a config file
+touch $RBR/etc/my.cnf
+
+%pre server
# Shut down a previously installed server first
if test -x /etc/init.d/mysql
then
@@ -336,13 +340,13 @@ then
sleep 5
fi
-%post
+%post server
mysql_datadir=/var/lib/mysql
# Create data directory if needed
-if test ! -d $mysql_datadir; then mkdir $mysql_datadir; fi
-if test ! -d $mysql_datadir/mysql; then mkdir $mysql_datadir/mysql; fi
-if test ! -d $mysql_datadir/test; then mkdir $mysql_datadir/test; fi
+if test ! -d $mysql_datadir; then mkdir -m755 $mysql_datadir; fi
+if test ! -d $mysql_datadir/mysql; then mkdir $mysql_datadir/mysql; fi
+if test ! -d $mysql_datadir/test; then mkdir $mysql_datadir/test; fi
# Make MySQL start/shutdown automatically when the machine does it.
# use insserv for older SuSE Linux versions
@@ -384,7 +388,7 @@ sleep 2
echo "Restarting mysqld."
/etc/init.d/mysql restart > /dev/null 2>&1
-%preun
+%preun server
if test $1 = 0
then
# Stop MySQL before uninstalling it
@@ -430,6 +434,8 @@ fi
%doc %attr(644, root, man) %{_mandir}/man1/perror.1*
%doc %attr(644, root, man) %{_mandir}/man1/replace.1*
+%ghost %config(noreplace,missingok) /etc/my.cnf
+
%attr(755, root, root) /usr/bin/isamchk
%attr(755, root, root) /usr/bin/isamlog
%attr(755, root, root) /usr/bin/my_print_defaults
@@ -529,6 +535,12 @@ fi
%changelog
+* Tue Feb 11 2003 Lenz Grimmer <lenz@mysql.com>
+
+- re-added missing pre- and post(un)install scripts to server subpackage
+- added config file /etc/my.cnf to the file list (just for completeness)
+- make sure to create the datadir with 755 permissions
+
* Mon Jan 27 2003 Lenz Grimmer <lenz@mysql.com>
- removed unused CC and CXX variables