diff options
author | Daniel Baumann <daniel.baumann@open-infrastructure.net> | 2016-06-18 06:30:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@open-infrastructure.net> | 2016-07-01 09:31:09 +0000 |
commit | 366b9ac41c3c5ee8ceca2a024554fe6a81b2a46d (patch) | |
tree | 94cd6943a499c5bd553770e9d9c5674f74901c49 /lib/container/create | |
parent | Correcting local commands extraction in container bash-completion. (diff) | |
download | compute-tools-366b9ac41c3c5ee8ceca2a024554fe6a81b2a46d.tar.xz compute-tools-366b9ac41c3c5ee8ceca2a024554fe6a81b2a46d.zip |
Correcting bind mount directory creation in container create command to work with multiple directories at once.
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
Diffstat (limited to 'lib/container/create')
-rwxr-xr-x | lib/container/create | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/container/create b/lib/container/create index 6d6fc86..f5d005c 100755 --- a/lib/container/create +++ b/lib/container/create @@ -135,17 +135,18 @@ fi CNT_AUTO="${CNT_AUTO:-$(hostname -f)}" -BINDS="$(echo ${BIND} | sed -e 's|;| |g')" +# Creating bind mounts +if [ -n "${BIND}" ] +then + BINDS="$(echo ${BIND} | sed -e 's|;| |g')" -for ENTRY in ${BINDS} -do - DIRECTORY="$(echo ${ENTRY} | awk -F: '{ print $1 }')" + for BIND in ${BINDS} + do + DIRECTORY="$(echo ${BIND} | awk -F: '{ print $1 }')" - if [ ! -e "${DIRECTORY}" ] - then mkdir -p "${DIRECTORY}" - fi -done + done +fi # config mkdir -p "${CONFIG}" |