projects
/
openwrt
/
svn-archive
/
packages.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f928a60
)
mysql: properly handle quoted datadirs in initscript
author
Jo-Philipp Wich
<jow@openwrt.org>
Sat, 29 Jan 2011 18:51:47 +0000
(18:51 +0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Sat, 29 Jan 2011 18:51:47 +0000
(18:51 +0000)
SVN-Revision: 25243
libs/mysql/files/mysqld.init
patch
|
blob
|
history
diff --git
a/libs/mysql/files/mysqld.init
b/libs/mysql/files/mysqld.init
index 32fe7b214fece7c41c7f6f504dd62aa53af0fa41..693dade6c1552fef6a74f45574e400f8d299eab9 100644
(file)
--- 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