mysql: fix datadir check in init script

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
This commit is contained in:
Jo-Philipp Wich
2015-07-02 14:20:30 +02:00
parent 38b1cf314e
commit 2dbf4507c3
2 changed files with 3 additions and 3 deletions
+1 -1
View 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