1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-14 11:23:57 +02:00

mariadb: Drop unused rundir fix socket dir perms

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>
(cherry picked from commit 8f6831b64b)
This commit is contained in:
Michal Hrusecky 2022-10-21 22:43:52 +02:00 committed by Josef Schlehofer
parent a341405111
commit fadd38f27d
No known key found for this signature in database
GPG Key ID: B950216FE4329F4C

View File

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