summaryrefslogtreecommitdiff
path: root/support-files
diff options
context:
space:
mode:
authorChad MILLER <chad@mysql.com>2008-07-10 14:50:07 -0400
committerChad MILLER <chad@mysql.com>2008-07-10 14:50:07 -0400
commitc425bf421da9ffa55d3d568f70508fa12dd07aa0 (patch)
tree667c2782c7fcee247010d3413aaf80a81fc6dd92 /support-files
parent6a6e77eeffc7dbd72888ef685fdb93fc2ae7aed6 (diff)
parent0db1f520c629455b4766c3d8f57a9767d7f6a98f (diff)
downloadmariadb-git-c425bf421da9ffa55d3d568f70508fa12dd07aa0.tar.gz
Merge chunk from trunk.
Diffstat (limited to 'support-files')
-rw-r--r--support-files/mysql.server.sh33
-rw-r--r--support-files/mysql.spec.sh6
-rw-r--r--support-files/mysqld_multi.server.sh4
3 files changed, 38 insertions, 5 deletions
diff --git a/support-files/mysql.server.sh b/support-files/mysql.server.sh
index 0a87b04c992..ac7a9c25ce6 100644
--- a/support-files/mysql.server.sh
+++ b/support-files/mysql.server.sh
@@ -150,24 +150,47 @@ parse_manager_arguments() {
}
wait_for_pid () {
+ verb="$1"
+ manager_pid="$2" # process ID of the program operating on the pid-file
i=0
+ avoid_race_condition="by checking again"
while test $i -ne $service_startup_timeout ; do
- sleep 1
- case "$1" in
+
+ case "$verb" in
'created')
+ # wait for a PID-file to pop into existence.
test -s $pid_file && i='' && break
- kill -0 $2 || break # if the program goes away, stop waiting
;;
'removed')
+ # wait for this PID-file to disappear
test ! -s $pid_file && i='' && break
;;
*)
- echo "wait_for_pid () usage: wait_for_pid created|removed"
+ echo "wait_for_pid () usage: wait_for_pid created|removed manager_pid"
exit 1
;;
esac
+
+ # if manager isn't running, then pid-file will never be updated
+ if test -n "$manager_pid"; then
+ if kill -0 "$manager_pid" 2>/dev/null; then
+ : # the manager still runs
+ else
+ # The manager may have exited between the last pid-file check and now.
+ if test -n "$avoid_race_condition"; then
+ avoid_race_condition=""
+ continue # Check again.
+ fi
+
+ # there's nothing that will affect the file.
+ log_failure_msg "Manager of pid-file quit without updating file."
+ return 1 # not waiting any more.
+ fi
+ fi
+
echo $echo_n ".$echo_c"
i=`expr $i + 1`
+ sleep 1
done
if test -z "$i" ; then
@@ -335,7 +358,7 @@ case "$mode" in
echo $echo_n "Shutting down MySQL"
kill $mysqlmanager_pid
# mysqlmanager should remove the pid_file when it exits, so wait for it.
- wait_for_pid removed; return_value=$?
+ wait_for_pid removed "$mysqlmanager_pid"; return_value=$?
# delete lock for RedHat / SuSE
if test -f $lock_dir
diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh
index 14b3c60a92a..68f2950b983 100644
--- a/support-files/mysql.spec.sh
+++ b/support-files/mysql.spec.sh
@@ -700,10 +700,12 @@ fi
%files ndb-storage
%defattr(-,root,root,0755)
%attr(755, root, root) %{_sbindir}/ndbd
+%doc %attr(644, root, man) %{_mandir}/man8/ndbd.8*
%files ndb-management
%defattr(-,root,root,0755)
%attr(755, root, root) %{_sbindir}/ndb_mgmd
+%doc %attr(644, root, man) %{_mandir}/man8/ndb_mgmd.8*
%files ndb-tools
%defattr(-,root,root,0755)
@@ -793,6 +795,10 @@ fi
# itself - note that they must be ordered by date (important when
# merging BK trees)
%changelog
+* Wed Mar 19 2008 Joerg Bruehe <joerg@mysql.com>
+
+- Add the man pages for "ndbd" and "ndb_mgmd".
+
* Mon Feb 18 2008 Timothy Smith <tim@mysql.com>
- Require a manual upgrade if the alread-installed mysql-server is
diff --git a/support-files/mysqld_multi.server.sh b/support-files/mysqld_multi.server.sh
index aaf3f2ebb40..75908a5db9d 100644
--- a/support-files/mysqld_multi.server.sh
+++ b/support-files/mysqld_multi.server.sh
@@ -7,6 +7,10 @@
#
# This script can be used as /etc/init.d/mysql.server
#
+# Comments to support chkconfig on RedHat Linux
+# chkconfig: 2345 64 36
+# description: A very fast and reliable SQL database engine.
+#
# Version 1.0
#