Commit 729a6fd0 authored by mtaylor@qualinost.(none)'s avatar mtaylor@qualinost.(none)

Merge qualinost.(none):/home/mtaylor/src/mysql/mysql-5.0-maint

into  qualinost.(none):/home/mtaylor/src/mysql/mysql-5.1-new-maint
parents 85695a3d 99c5f418
...@@ -261,13 +261,13 @@ else ...@@ -261,13 +261,13 @@ else
esac esac
fi fi
# Safeguard (relative paths, core dumps..)
cd $basedir
case "$mode" in case "$mode" in
'start') 'start')
# Start daemon # Start daemon
# Safeguard (relative paths, core dumps..)
cd $basedir
manager=$bindir/mysqlmanager manager=$bindir/mysqlmanager
if test -x $libexecdir/mysqlmanager if test -x $libexecdir/mysqlmanager
then then
...@@ -362,20 +362,52 @@ case "$mode" in ...@@ -362,20 +362,52 @@ case "$mode" in
fi fi
;; ;;
'reload') 'reload'|'force-reload')
if test -s "$server_pid_file" ; then if test -s "$server_pid_file" ; then
mysqld_pid=`cat $server_pid_file` read mysqld_pid < $server_pid_file
kill -HUP $mysqld_pid && log_success_msg "Reloading service MySQL" kill -HUP $mysqld_pid && log_success_msg "Reloading service MySQL"
touch $server_pid_file touch $server_pid_file
else else
log_failure_msg "MySQL PID file could not be found!" log_failure_msg "MySQL PID file could not be found!"
exit 1
fi fi
;; ;;
'status')
*) # First, check to see if pid file exists
# usage if test -s "$server_pid_file" ; then
echo "Usage: $0 {start|stop|restart|reload} [ MySQL server options ]" read mysqld_pid < $server_pid_file
exit 1 if kill -0 $mysqld_pid 2>/dev/null ; then
log_success_msg "MySQL running ($mysqld_pid)"
exit 0
else
log_failure_msg "MySQL is not running, but PID file exists"
exit 1
fi
else
# Try to find appropriate mysqld process
mysqld_pid=`pidof $sbindir/mysqld`
if test -z $mysqld_pid ; then
if test "$use_mysqld_safe" = "0" ; then
lockfile=/var/lock/subsys/mysqlmanager
else
lockfile=/var/lock/subsys/mysql
fi
if test -f $lockfile ; then
log_failure_msg "MySQL is not running, but lock exists"
exit 2
fi
log_failure_msg "MySQL is not running"
exit 3
else
log_failure_msg "MySQL is running but PID file could not be found"
exit 4
fi
fi
;;
*)
# usage
echo "Usage: $0 {start|stop|restart|reload|force-reload|status} [ MySQL server options ]"
exit 1
;; ;;
esac esac
......
Markdown is supported
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