From 13d027613dc9bc51202eb338821c558580c031a4 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Mon, 21 Mar 2016 19:27:15 +0000 Subject: main/mariadb: fix init.d script - find the pidfile from *_pre script instead from global scope - move init.d script to the server package instead of -common --- main/mariadb/mariadb.initd | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'main/mariadb/mariadb.initd') diff --git a/main/mariadb/mariadb.initd b/main/mariadb/mariadb.initd index cb2a388b96..a652ffaf3f 100644 --- a/main/mariadb/mariadb.initd +++ b/main/mariadb/mariadb.initd @@ -6,7 +6,6 @@ getconf() { } retry="60" -pidfile=$(getconf pid-file "/run/mysqld/mysqld.pid") extra_stopped_commands="setup" command="/usr/bin/mysqld_safe" command_args="--pid-file=$pidfile --syslog --nowatch" @@ -23,6 +22,7 @@ setup() { } start_pre() { + pidfile=$(getconf pid-file "/run/mysqld/mysqld.pid") required_dirs=$(getconf datadir "/var/lib/mysql") if [ ! -d $required_dirs/mysql ]; then eerror "Datadir '$required_dirs' is empty or invalid." @@ -33,3 +33,8 @@ start_pre() { start_post() { ewaitfile 10 $(getconf socket "/run/mysqld/mysqld.sock") } + +stop_pre() { + pidfile=$(getconf pid-file "/run/mysqld/mysqld.pid") +} + -- cgit v1.2.3