From 3b3dc790bfdbfb63aeb4dd0bbd7f9f0e9c21d47d Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Wed, 18 Oct 2017 13:19:38 +0200 Subject: [dnbd3-proxy] better use of $@ * handle multiple SLX_KCL_SERVERS --- .../data/opt/openslx/scripts/systemd-setup_dnbd3_proxy | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/modules/dnbd3-proxy-mode/data/opt/openslx/scripts/systemd-setup_dnbd3_proxy b/core/modules/dnbd3-proxy-mode/data/opt/openslx/scripts/systemd-setup_dnbd3_proxy index f2edd566..2881e0f3 100755 --- a/core/modules/dnbd3-proxy-mode/data/opt/openslx/scripts/systemd-setup_dnbd3_proxy +++ b/core/modules/dnbd3-proxy-mode/data/opt/openslx/scripts/systemd-setup_dnbd3_proxy @@ -77,7 +77,7 @@ EOF add_alt_server() { local PRE= [ "x$1" = "x-" ] && PRE='-' && shift - for ALT in $@; do + for ALT in "$@"; do echo "${PRE}${ALT}" >> "${DNBD3_CONF_DIR}/alt-servers" [ "x${ALT}" = "x${SLX_PXE_SERVER_IP}" ] && FOUND_SAT="oui" done @@ -94,9 +94,9 @@ chmod a+Xr "${DNBD3_CONF_DIR}" # create rpc.acl to allow the satellite only rm -f "${DNBD3_CONF_DIR}/rpc.acl" -cat < "${DNBD3_CONF_DIR}/rpc.acl" -${SLX_KCL_SERVERS} STATS CLIENT_LIST IMAGE_LIST -EOF +for SRV in ${SLX_KCL_SERVERS}; do + echo "$SRV STATS CLIENT_LIST IMAGE_LIST" >> "${DNBD3_CONF_DIR}/rpc.acl" +done rm -f "/opt/openslx/iptables/rules.d/99-dnbd3" # now create iptables helper rules -- cgit v1.2.3-55-g7522