sys-cluster/galera: Remove bashism from init script
authorBrian Evans <grknight@gentoo.org>
Mon, 18 Nov 2019 18:59:52 +0000 (13:59 -0500)
committerBrian Evans <grknight@gentoo.org>
Mon, 18 Nov 2019 18:59:52 +0000 (13:59 -0500)
Package-Manager: Portage-2.3.79, Repoman-2.3.18
Signed-off-by: Brian Evans <grknight@gentoo.org>
sys-cluster/galera/files/garb.init

index 5bf57a7a683e346a149f2cfc677ff300056ee8f5..6da7a758228676b8c23fbb967dd2c249f058a2b0 100644 (file)
@@ -26,7 +26,8 @@ start_pre() {
 
        GALERA_PORT=${GALERA_PORT:-4567}
 
-       local OPTIONS="-a gcomm://${GALERA_NODES// /,} -g ${GALERA_GROUP}"
+       local nodes=$(echo "${GALERA_NODES}" | awk '{ gsub(" ", ",") ; print $0 }')
+       local OPTIONS="-a gcomm://${nodes} -g ${GALERA_GROUP}"
        [ -n "${GALERA_OPTIONS}" ] && OPTIONS="${OPTIONS} -o ${GALERA_OPTIONS}"
        [ -n "${LOG_FILE}" ]       && OPTIONS="${OPTIONS} -l ${LOG_FILE}"
        [ -n "${NODE_NAME}" ]      && OPTIONS="${OPTIONS} -n ${NODE_NAME}"