From: jow Date: Sat, 29 Jan 2011 18:51:47 +0000 (+0000) Subject: [packages] mysql: properly handle quoted datadirs in initscript X-Git-Url: http://207.154.207.93/?a=commitdiff_plain;h=b8b048293796d5b80920a935a678b9bf73568c3b;p=packages.git [packages] mysql: properly handle quoted datadirs in initscript git-svn-id: svn://svn.openwrt.org/openwrt/packages@25243 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- 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