mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 15:38:40 +01:00
mysql: fix datadir check in init script
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
This commit is contained in:
@@ -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.
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
# See /LICENSE for more information.
|
# See /LICENSE for more information.
|
||||||
@@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/uclibc++.mk
|
|||||||
|
|
||||||
PKG_NAME:=mysql
|
PKG_NAME:=mysql
|
||||||
PKG_VERSION:=5.1.73
|
PKG_VERSION:=5.1.73
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=\
|
PKG_SOURCE_URL:=\
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ error() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
start() {
|
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
|
if [ ! -d "$datadir" ]; then
|
||||||
error "Error: datadir '$datadir' in /etc/my.cnf doesn't exist"
|
error "Error: datadir '$datadir' in /etc/my.cnf doesn't exist"
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
Reference in New Issue
Block a user