Skip to content
Permalink
Browse files
MDEV-30329: mariadb-service-convert resets systemd service to default…
… User=root

If mariadb-service-convert is run and the user variable is unset then
this sets `User=` in `[Service]`, which then tries to run mariadb as
root, which in-turn fails. This only happens when mysqld_safe is missing
which is all the time now. So don't set `User=` if there is no user variable.

Reviewer: Sergei Golubchik <serg@mariadb.org> (in PR #2382)
  • Loading branch information
LinuxJedi authored and grooverdan committed Jan 3, 2023
1 parent 21223c0 commit e51a1d6
Showing 1 changed file with 1 addition and 1 deletion.
@@ -36,7 +36,7 @@ echo '[Service]'
echo


if [[ ( "$user" != "root" && "$user" != "mysql" ) || "${SET_USER}" == 1 ]]; then
if [[ ( ! -z "$user" && "$user" != "root" && "$user" != "mysql" ) || "${SET_USER}" == 1 ]]; then
echo User=$user
fi

0 comments on commit e51a1d6

Please sign in to comment.