summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2017-02-23 17:51:40 +0100
committerMichał Górny <mgorny@gentoo.org>2017-03-08 08:35:30 +0100
commit994ecaf07a4d3dcc19c7b9ab11b620432886e18a (patch)
treefc33923053d861ac1297919fe1f9bc663123bdbf /eclass/mysql-multilib-r1.eclass
parentjava-ant-2.eclass: Replace unnecessary evals with arrays (diff)
downloadgentoo-994ecaf07a4d3dcc19c7b9ab11b620432886e18a.tar.gz
gentoo-994ecaf07a4d3dcc19c7b9ab11b620432886e18a.tar.bz2
gentoo-994ecaf07a4d3dcc19c7b9ab11b620432886e18a.zip
mysql-multilib-r1.eclass: Replace unnecessary eval with bash array
Diffstat (limited to 'eclass/mysql-multilib-r1.eclass')
-rw-r--r--eclass/mysql-multilib-r1.eclass12
1 files changed, 6 insertions, 6 deletions
diff --git a/eclass/mysql-multilib-r1.eclass b/eclass/mysql-multilib-r1.eclass
index f82cc101af05..c22ff72f0876 100644
--- a/eclass/mysql-multilib-r1.eclass
+++ b/eclass/mysql-multilib-r1.eclass
@@ -941,19 +941,19 @@ mysql-multilib-r1_pkg_config() {
if [[ ${PN} == "mysql" || ${PN} == "percona-server" ]] && version_is_at_least "5.7.6" ; then
# --initialize-insecure will not set root password
# --initialize would set a random one in the log which we don't need as we set it ourselves
- cmd="${EROOT}usr/sbin/mysqld"
+ cmd=( "${EROOT}usr/sbin/mysqld" )
initialize_options="--initialize-insecure '--init-file=${sqltmp}'"
sqltmp="" # the initialize will take care of it
else
- cmd="${EROOT}usr/share/mysql/scripts/mysql_install_db"
- [[ -f "${cmd}" ]] || cmd="${EROOT}usr/bin/mysql_install_db"
+ cmd=( "${EROOT}usr/share/mysql/scripts/mysql_install_db" )
+ [[ -f "${cmd}" ]] || cmd=( "${EROOT}usr/bin/mysql_install_db" )
if [[ -r "${help_tables}" ]] ; then
cat "${help_tables}" >> "${sqltmp}"
fi
fi
- cmd="'$cmd' '--basedir=${EPREFIX}/usr' ${options} '--datadir=${ROOT}/${MY_DATADIR}' '--tmpdir=${ROOT}/${MYSQL_TMPDIR}' ${initialize_options}"
- einfo "Command: $cmd"
- eval $cmd \
+ cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" ${initialize_options} )
+ einfo "Command: ${cmd[*]}"
+ "${cmd[@]}" \
>"${TMPDIR}"/mysql_install_db.log 2>&1
if [ $? -ne 0 ]; then
grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2