From 9e8231cd9c5ade2160edbd32e89f35ed46d5a413 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sat, 29 Jan 2011 18:51:47 +0000 Subject: [PATCH] mysql: properly handle quoted datadirs in initscript SVN-Revision: 25243 --- libs/mysql/files/mysqld.init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/mysql/files/mysqld.init b/libs/mysql/files/mysqld.init index 32fe7b214..693dade6c 100644 --- a/libs/mysql/files/mysqld.init +++ b/libs/mysql/files/mysqld.init @@ -8,7 +8,7 @@ PID=/var/run/mysqld.pid CMD=/usr/bin/mysqld start() { - local datadir=$(sed -n -e 's/^[[:space:]]*datadir[[:space:]]*=[[:space:]]*//p' /etc/my.cnf) + local datadir=$(sed -n -e "s/^[[:space:]]*datadir[[:space:]]*=[[:space:]]*[\"']\?\([^\"']*\)[\"']\?/\1/p" /etc/my.cnf) if [ ! -d "$datadir" ]; then echo "Error: datadir in /etc/my.cnf ($datadir) doesn't exist" return 1 -- 2.30.2