summaryrefslogtreecommitdiffstats
path: root/core/modules/dnbd3-proxy-mode
diff options
context:
space:
mode:
authorJonathan Bauer2017-10-18 13:19:38 +0200
committerJonathan Bauer2017-10-18 13:19:38 +0200
commit3b3dc790bfdbfb63aeb4dd0bbd7f9f0e9c21d47d (patch)
tree447f0eb4e20ed43898bdaa5f8374bc9b96a71384 /core/modules/dnbd3-proxy-mode
parent[dnbd3-proxy] fix stupid insert instead of append (diff)
downloadmltk-3b3dc790bfdbfb63aeb4dd0bbd7f9f0e9c21d47d.tar.gz
mltk-3b3dc790bfdbfb63aeb4dd0bbd7f9f0e9c21d47d.tar.xz
mltk-3b3dc790bfdbfb63aeb4dd0bbd7f9f0e9c21d47d.zip
[dnbd3-proxy] better use of $@
* handle multiple SLX_KCL_SERVERS
Diffstat (limited to 'core/modules/dnbd3-proxy-mode')
-rwxr-xr-xcore/modules/dnbd3-proxy-mode/data/opt/openslx/scripts/systemd-setup_dnbd3_proxy8
1 files 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 <<EOF > "${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