mysql_install_db always has to pass --user=$user to the mysqld

followup for 9d18b624675

strangely enough it only failed upgrade test on eoan
This commit is contained in:
Sergei Golubchik 2020-01-18 02:02:29 +01:00
parent 4de32015be
commit 74a0cde1c6

View File

@ -478,9 +478,9 @@ do
fi fi
done done
if test -n "$user" -a "$in_rpm" -eq 0 if test -n "$user"
then then
if test -z "$srcdir" if test -z "$srcdir" -a "$in_rpm" -eq 0
then then
chown 0 "$pamtooldir/auth_pam_tool_dir/auth_pam_tool" && \ chown 0 "$pamtooldir/auth_pam_tool_dir/auth_pam_tool" && \
chmod 04755 "$pamtooldir/auth_pam_tool_dir/auth_pam_tool" chmod 04755 "$pamtooldir/auth_pam_tool_dir/auth_pam_tool"
@ -490,14 +490,14 @@ then
echo "It must be root, the PAM authentication plugin doesn't work otherwise.." echo "It must be root, the PAM authentication plugin doesn't work otherwise.."
echo echo
fi fi
fi chown $user "$pamtooldir/auth_pam_tool_dir" && \
chown $user "$pamtooldir/auth_pam_tool_dir" && \ chmod 0700 "$pamtooldir/auth_pam_tool_dir"
chmod 0700 "$pamtooldir/auth_pam_tool_dir" if test $? -ne 0
if test $? -ne 0 then
then echo "Cannot change ownership of the '$pamtooldir/auth_pam_tool_dir' directory"
echo "Cannot change ownership of the '$pamtooldir/auth_pam_tool_dir' directory" echo "to the '$user' user. Check that you have the necessary permissions and try again."
echo "to the '$user' user. Check that you have the necessary permissions and try again." echo
echo fi
fi fi
args="$args --user=$user" args="$args --user=$user"
fi fi