Fix mariadb-wait-ready script

This commit is contained in:
Honza Horák 2013-11-27 15:22:54 +01:00
parent 26fa8b35cd
commit 2b8c23763f
2 changed files with 6 additions and 8 deletions

View File

@ -27,18 +27,13 @@ get_mysql_option mysqld datadir "/var/lib/mysql"
datadir="$result"
get_mysql_option mysqld socket "/var/lib/mysql/mysql.sock"
socketfile="$result"
get_mysql_option mysqld_safe pid-file "/var/run/mysqld/mysqld.pid"
mypidfile="$result"
# Wait for the server to come up or for the mysqld process to disappear
ret=0
while /bin/true; do
MYSQLDRUNNING=0
if [ -f "$mypidfile" ]; then
MYSQLPID=`cat "$mypidfile" 2>/dev/null`
if [ -n "$MYSQLPID" ] && [ -d "/proc/$MYSQLPID" ] ; then
MYSQLDRUNNING=1
fi
if [ -d "/proc/${daemon_pid}" ] ; then
MYSQLDRUNNING=1
fi
RESPONSE=`/usr/bin/mysqladmin --no-defaults --socket="$socketfile" --user=UNKNOWN_MYSQL_USER ping 2>&1`
mret=$?

View File

@ -7,7 +7,7 @@
Name: mariadb
Version: 5.5.34
Release: 1%{?dist}
Release: 2%{?dist}
Epoch: 1
Summary: A community developed branch of MySQL
@ -799,6 +799,9 @@ fi
%{_mandir}/man1/mysql_client_test.1*
%changelog
* Wed Nov 27 2013 Honza Horak <hhorak@redhat.com> 1:5.5.34-2
- Fix mariadb-wait-ready script
* Fri Nov 22 2013 Honza Horak <hhorak@redhat.com> 1:5.5.34-1
- Rebase to 5.5.34