Ignore:
Timestamp:
2011-01-29T19:51:47+01:00 (6 years ago)
Author:
jow
Message:

[packages] mysql: properly handle quoted datadirs in initscript

File:
1 edited

Legend:

Unmodified
Added
Removed
  • packages/libs/mysql/files/mysqld.init

    r24567 r25243  
    99 
    1010start() { 
    11         local datadir=$(sed -n -e 's/^[[:space:]]*datadir[[:space:]]*=[[:space:]]*//p' /etc/my.cnf) 
     11        local datadir=$(sed -n -e "s/^[[:space:]]*datadir[[:space:]]*=[[:space:]]*[\"']\?\([^\"']*\)[\"']\?/\1/p" /etc/my.cnf) 
    1212        if [ ! -d "$datadir" ]; then 
    1313                echo "Error: datadir in /etc/my.cnf ($datadir) doesn't exist" 
Note: See TracChangeset for help on using the changeset viewer.