blob: fe9adbdba4694b70aa30de3bddebb893ad705bb6 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001--- a/scripts/mysql_install_db.sh
2+++ b/scripts/mysql_install_db.sh
3@@ -364,6 +364,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@@ -488,7 +496,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 if test -z "$srcdir" -a "$in_rpm" -eq 0
28 then
29@@ -509,6 +519,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