1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-15 03:43:53 +02:00

mariadb: fix /etc/mysql setup

- create directory /etc/mysql/conf.d as without it the server refuses to
  start
- correct the path to my.cnf in the init script

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
This commit is contained in:
Sebastian Kemper 2018-05-13 08:42:42 +02:00
parent f1b49babad
commit 3bdaa522df
2 changed files with 2 additions and 2 deletions

View File

@ -453,7 +453,7 @@ define Package/mariadb-server/install
$(INSTALL_DIR) $(1)/usr/bin
$(foreach b,$(MARIADB_SERVER),$(call Package/mariadb/install/bin,$(1),$(b));)
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/etc/mysql
$(INSTALL_DIR) $(1)/etc/mysql/conf.d
$(INSTALL_BIN) files/mysqld.init $(1)/etc/init.d/mysqld
$(INSTALL_CONF) conf/my.cnf $(1)/etc/mysql
$(INSTALL_DIR) $(1)$(PLUGIN_DIR)

View File

@ -10,7 +10,7 @@ SERVICE_STOP_TIME=9
PROG='/usr/bin/mysqld'
start() {
local conf='/etc/my.cnf'
local conf='/etc/mysql/my.cnf'
local datadir="$( sed -nE "s/^\s*datadir\s*=\s*('([^']*)'|\x22([^\x22]*)\x22|(.*\S))\s*$/\2\3\4/p" "$conf" )"
[ -d "$datadir" ] || {