mariadb: Cleanup and bump 13658/head
authorMichal Hrusecky <michal.hrusecky@turris.com>
Tue, 13 Oct 2020 06:55:36 +0000 (08:55 +0200)
committerMichal Hrusecky <michal.hrusecky@turris.com>
Wed, 14 Oct 2020 09:08:42 +0000 (11:08 +0200)
Remove few no longer needed bits - like checking that datadir is defined
or mysqld_safe from server package and bumping revision after all the
init script cleanups.

Signed-off-by: Michal Hrusecky <michal.hrusecky@turris.com>
utils/mariadb/Makefile
utils/mariadb/files/mysqld.init

index 162b0860a5628c646ef48113816cae4eb5276787..7dfd96f5e252a3ff2026902924899ddde9b7ef27 100644 (file)
@@ -137,8 +137,7 @@ MARIADB_SERVER := \
        mysql_install_db \
        mysql_upgrade \
        mysqladmin \
-       mysqld \
-       mysqld_safe
+       mysqld
 
 MARIADB_SERVER_EXTRA := \
        aria_chk \
@@ -157,6 +156,7 @@ MARIADB_SERVER_EXTRA := \
        mysql_setpermission \
        mysql_tzinfo_to_sql \
        mysqld_multi \
+       mysqld_safe \
        mysqld_safe_helper \
        mysqldumpslow \
        mysqlhotcopy \
index d502e2baf36301ee4c079a0f9237412ad9372d5c..bf0d86827a88b6a8542e75e1223998781da3e073 100644 (file)
@@ -35,7 +35,7 @@ mysqld_get_param() {
 mysql_kill() {
        [ -n "$pidfile" ] || pidfile="$(mysqld_get_param pid-file)"
        [ -f "$pidfile" ] || return 1
-       pid="$(cat $pidfile)"
+       pid="$(cat "$pidfile")"
        [ -n "$pid" ] || return 2
        kill "$1" "$pid"
 }
@@ -102,18 +102,6 @@ start_service() {
        datadir="$(mysqld_get_param datadir)"
        tmpdir="$(mysqld_get_param tmpdir)"
 
-       if [ -z "$datadir" ]; then
-               $LOGGER "datadir is not set"
-               $LOGGER "$hint"
-               exit 1
-       fi
-
-       if [ -z "$tmpdir" ]; then
-               $LOGGER "tmpdir is not set"
-               $LOGGER "$hint"
-               exit 1
-       fi
-
        if [ ! -f "$datadir/mysql/tables_priv.MAD" ]; then
                args="--force"
                basedir="$(mysqld_get_param basedir)"
@@ -144,7 +132,7 @@ start_service() {
        # Start daemon
        procd_open_instance
 
-       # shellcheck disable=SC2086
+       # shellcheck disable=SC2154 disable=SC2086
        procd_set_param command "$MYSQLD" $options
        procd_set_param respawn "${respawn_threshold:-3600}" "${respawn_timeout:-5}" "${respawn_retry:-5}"
        # run as user