mariadb: Drop unused rundir fix socket dir perms
authorMichal Hrusecky <michal@hrusecky.net>
Fri, 21 Oct 2022 20:43:52 +0000 (22:43 +0200)
committerRosen Penev <rosenp@gmail.com>
Mon, 24 Oct 2022 18:15:36 +0000 (11:15 -0700)
We had been creating "rundir" but it was never used, probably leftover
from some removed function. At the same time, we were setting quite
strict rights to the socket directory (while comments sugested
otherwise).

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

index 8fff379e1cf97cafb47a2b6b98e85ccaca096884..52def2d3c5e2c52ba0a86fc454ed2748e06dde4d 100644 (file)
@@ -67,7 +67,6 @@ mysqld_status() {
 start_service() {
        conf=/etc/mysql/my.cnf
        logdir=/var/log/mysql
-       rundir=/var/run/mysqld
        version="$(mysqld --version | sed -n 's|.*Ver[[:blank:]]*\([0-9.]*\)-.*|\1|p')"
 
        # Few basic checks
@@ -134,14 +133,11 @@ start_service() {
        fi
 
        # Make sure all required directories exists and have correct rights
-       for i in "$logdir" "$rundir" "$sockdir"; do
+       for i in "$logdir" "$sockdir"; do
                opts="-m 0750"
                if ! [ -e "$i" ]; then
-                       # $rundir needs to be accessible for
-                       # clients
-                       if [ "$i" = "$rundir" ]; then
-                               opts=
-                       fi
+                       # $sockdir needs to be accessible for clients
+                       [ "$i" = "$sockdir" ] && opts="-m 0755"
                        # shellcheck disable=SC2086
                        mkdir -p $opts "$i"
                fi