diff options
author | Simon Spöhel <simon@spoehel.ch> | 2019-07-23 05:48:06 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@open-infrastructure.net> | 2019-08-11 08:50:14 +0000 |
commit | 16fd36df205f3e11e9508f337d904ad79c45e24c (patch) | |
tree | 6190240ca34efe580ac04264a257c755b32f0c7c /lib | |
parent | Fixing a bug where directories were not created for --bind-ro. (diff) | |
download | compute-tools-16fd36df205f3e11e9508f337d904ad79c45e24c.tar.xz compute-tools-16fd36df205f3e11e9508f337d904ad79c45e24c.zip |
Fixing a bug where only the last item in lists passed via CLI was evaluated.
Signed-off-by: Simon Spöhel <simon@spoehel.ch>
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/container/create | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/container/create b/lib/container/create index 9ae578c..1b9defe 100755 --- a/lib/container/create +++ b/lib/container/create @@ -194,9 +194,9 @@ if [ -n "${BIND}" ] then BINDS="$(echo ${BIND} | sed -e 's|;| |g')" - for BIND in ${BINDS} + for ENTRY in ${BINDS} do - DIRECTORY="$(echo ${BIND} | awk -F: '{ print $1 }')" + DIRECTORY="$(echo ${ENTRY} | awk -F: '{ print $1 }')" mkdir -p "${DIRECTORY}" done @@ -207,9 +207,9 @@ if [ -n "${BIND_RO}" ] then BINDS_RO="$(echo ${BIND_RO} | sed -e 's|;| |g')" - for BIND_RO in ${BINDS_RO} + for ENTRY in ${BINDS_RO} do - DIRECTORY="$(echo ${BIND_RO} | awk -F: '{ print $1 }')" + DIRECTORY="$(echo ${ENTRY} | awk -F: '{ print $1 }')" mkdir -p "${DIRECTORY}" done @@ -220,12 +220,12 @@ if [ -n "${CNT_OVERLAY}" ] then CNT_OVERLAYS="$(echo ${CNT_OVERLAY} | sed -e 's|;| |g')" - for CNT_OVERLAY in ${CNT_OVERLAYS} + for ENTRY in ${CNT_OVERLAYS} do - DIRECTORY_LOWER="$(echo ${CNT_OVERLAY} | awk -F: '{ print $1 }')" - DIRECTORY_UPPER="$(echo ${CNT_OVERLAY} | awk -F: '{ print $2 }')" - DIRECTORY_WORK="$(echo ${CNT_OVERLAY} | awk -F: '{ print $3 }')" - DIRECTORY_MERGED="$(echo ${CNT_OVERLAY} | awk -F: '{ print $4 }')" + DIRECTORY_LOWER="$(echo ${ENTRY} | awk -F: '{ print $1 }')" + DIRECTORY_UPPER="$(echo ${ENTRY} | awk -F: '{ print $2 }')" + DIRECTORY_WORK="$(echo ${ENTRY} | awk -F: '{ print $3 }')" + DIRECTORY_MERGED="$(echo ${ENTRY} | awk -F: '{ print $4 }')" for DIRECTORY in "${DIRECTORY_LOWER}" "${DIRECTORY_UPPER}" "${DIRECTORY_WORK}" "${DIRECTORY_MERGED}" do |