From 994ecaf07a4d3dcc19c7b9ab11b620432886e18a Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Thu, 23 Feb 2017 17:51:40 +0100 Subject: mysql-multilib-r1.eclass: Replace unnecessary eval with bash array --- eclass/mysql-multilib-r1.eclass | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'eclass/mysql-multilib-r1.eclass') 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 -- cgit v1.2.3-65-gdbad