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

View File

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