Merge pull request #10581 from dibdot/travelmate
[feed/packages.git] / utils / mariadb / patches / 180-relax-mysql_install-db-wrt-pam-tool.patch
1 --- a/scripts/mysql_install_db.sh
2 +++ b/scripts/mysql_install_db.sh
3 @@ -359,6 +359,14 @@ then
4 exit 1
5 fi
6 plugindir=`find_in_dirs --dir auth_pam.so $basedir/lib*/plugin $basedir/lib*/mysql/plugin $basedir/lib/*/mariadb19/plugin`
7 + # Upstream assumes all plugins will be always installed, but in OpenWrt we can
8 + # install a server without plugins if we want to.
9 + if test -z "$plugindir"
10 + then
11 + echo "Could not find plugin directory." >&2
12 + echo "Will continue with \"/usr/lib/mariadb/plugin\"." >&2
13 + plugindir=/usr/lib/mariadb/plugin
14 + fi
15 pamtooldir=$plugindir
16 # relative from where the script was run for a relocatable install
17 elif test -n "$dirname0" -a -x "$rel_mysqld" -a ! "$rel_mysqld" -ef "@sbindir@/mysqld"
18 @@ -478,7 +486,9 @@ do
19 fi
20 done
21
22 -if test -n "$user"
23 +# There should be no need for this on OpenWrt. If this turns out to be a wrong guess then
24 +# we can revisit.
25 +if test -n ""
26 then
27 chown $user "$pamtooldir/auth_pam_tool_dir" && \
28 chmod 0700 "$pamtooldir/auth_pam_tool_dir"
29 @@ -499,6 +509,10 @@ then
30 echo
31 fi
32 fi
33 +fi
34 +
35 +if test -n "$user"
36 +then
37 args="$args --user=$user"
38 fi
39