summaryrefslogtreecommitdiff
path: root/support-files/mysql.server.sh
diff options
context:
space:
mode:
authorjoerg@trift2. <>2006-06-22 12:22:52 +0200
committerjoerg@trift2. <>2006-06-22 12:22:52 +0200
commit5eea972046b764e944c296480b85f8f5bb50cc26 (patch)
tree7877008267a2eb98b9e6b8aa1644f22352df5081 /support-files/mysql.server.sh
parentd9fb74e40eb9a72491e5066a582ae5355f8e0d1d (diff)
parent27df8b07b7c189bfa1ff1238780ebe867ecc40d6 (diff)
downloadmariadb-git-5eea972046b764e944c296480b85f8f5bb50cc26.tar.gz
Merge mysql.com:/M50/bug19353-5.0 into mysql.com:/M51/bug19353-5.1
Diffstat (limited to 'support-files/mysql.server.sh')
-rw-r--r--support-files/mysql.server.sh18
1 files changed, 14 insertions, 4 deletions
diff --git a/support-files/mysql.server.sh b/support-files/mysql.server.sh
index 9e507bbe2b5..459699988ab 100644
--- a/support-files/mysql.server.sh
+++ b/support-files/mysql.server.sh
@@ -98,6 +98,11 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin:$basedir/bin
export PATH
mode=$1 # start or stop
+shift
+other_args="$*" # uncommon, but needed when called from an RPM upgrade action
+ # Expected: "--skip-networking --skip-grant-tables"
+ # They are not checked here, intentionally, as it is the resposibility
+ # of the "spec" file author to give correct arguments only.
case `echo "testing\c"`,`echo -n testing` in
*c*,-n*) echo_n= echo_c= ;;
@@ -264,6 +269,11 @@ case "$mode" in
echo $echo_n "Starting MySQL"
if test -x $manager -a "$use_mysqld_safe" = "0"
then
+ if test -n "$other_args"
+ then
+ log_failure_msg "MySQL manager does not support options '$other_args'"
+ exit 1
+ fi
# Give extra arguments to mysqld with the my.cnf file. This script may
# be overwritten at next upgrade.
"$manager" \
@@ -282,7 +292,7 @@ case "$mode" in
# Give extra arguments to mysqld with the my.cnf file. This script
# may be overwritten at next upgrade.
pid_file=$server_pid_file
- $bindir/mysqld_safe --datadir=$datadir --pid-file=$server_pid_file >/dev/null 2>&1 &
+ $bindir/mysqld_safe --datadir=$datadir --pid-file=$server_pid_file $other_args >/dev/null 2>&1 &
wait_for_pid created
# Make lock for RedHat / SuSE
@@ -330,8 +340,8 @@ case "$mode" in
'restart')
# Stop the service and regardless of whether it was
# running or not, start it again.
- $0 stop
- $0 start
+ $0 stop $other_args
+ $0 start $other_args
;;
'reload')
@@ -346,7 +356,7 @@ case "$mode" in
*)
# usage
- echo "Usage: $0 start|stop|restart|reload"
+ echo "Usage: $0 {start|stop|restart|reload} [ MySQL server options ]"
exit 1
;;
esac