mysql: fix datadir check in init script
authorJo-Philipp Wich <jow@openwrt.org>
Thu, 2 Jul 2015 12:20:30 +0000 (14:20 +0200)
committerJo-Philipp Wich <jow@openwrt.org>
Thu, 2 Jul 2015 12:22:02 +0000 (14:22 +0200)
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
utils/mysql/Makefile
utils/mysql/files/mysqld.init

index f0553a9d73eea94ed1d26dfb752bd35b54ebb22c..11d47d5635348ebb8ce45d5bd1ddae7a369da7e9 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2014 OpenWrt.org
+# Copyright (C) 2006-2015 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/uclibc++.mk
 
 PKG_NAME:=mysql
 PKG_VERSION:=5.1.73
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=\
index 48e61896ef952e98f2eaad22651d77f12499e0ff..eec96c08545e181fa11d31348019b4a78b7bea98 100644 (file)
@@ -13,7 +13,7 @@ error() {
 }
 
 start() {
-       local datadir=$(sed -n -e "s/^[[:space:]]*datadir[[:space:]]*=[[:space:]]*[\"']\?\([^\"']*\)[\"']\?/\1/p" /etc/my.cnf)
+       local datadir=$(sed -n -e "s/^[[:space:]]*datadir[[:space:]]*=[[:space:]\"']*\([^[:space:]\"']*\)[[:space:]\"']*/\1/p" /etc/my.cnf)
        if [ ! -d "$datadir" ]; then
                error "Error: datadir '$datadir' in /etc/my.cnf doesn't exist"
                return 1