From 1fff5525982432cfce7f9546b97a79e650077948 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Sat, 3 Aug 2013 10:42:44 +0300 Subject: [PATCH] intelegent fix for aio on openvz --- install/vst-install.sh | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/install/vst-install.sh b/install/vst-install.sh index 539795f2..9862526b 100644 --- a/install/vst-install.sh +++ b/install/vst-install.sh @@ -522,15 +522,20 @@ else wget $CHOST/$VERSION/mysql.cnf -O /etc/my.cnf fi -# Disable aio on OpenVZ -if [ -e "/proc/user_beancounters" ]; then - sed -i "s/#innodb_use_native_aio/innodb_use_native_aio/g" /etc/my.cnf -fi chkconfig mysqld on service mysqld start if [ "$?" -ne 0 ]; then - echo "Error: mysqld start failed" - exit + + # Fix for aio on OpenVZ + if [ -e "/proc/user_beancounters" ]; then + sed -i "s/#innodb_use_native_aio/innodb_use_native_aio/g" /etc/my.cnf + fi + + service mysqld start + if [ "$?" -ne 0 ]; then + echo "Error: mysqld start failed" + exit 1 + fi fi mysqladmin -u root password $mpass