From 5415070a9643b3227c0227a72ec05d0d282d7c38 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Jan 2018 10:21:52 +0100 Subject: Adding message when creating bind mount directories in container start command. Signed-off-by: Daniel Baumann --- lib/container/start | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'lib/container/start') diff --git a/lib/container/start b/lib/container/start index ff9ecc8..ca88af2 100755 --- a/lib/container/start +++ b/lib/container/start @@ -212,7 +212,11 @@ then do DIRECTORY="$(echo ${BIND} | awk -F: '{ print $1 }')" - mkdir -p "${DIRECTORY}" + if [ ! -e "${DIRECTORY}" ] + then + echo "'${DIRECTORY}': creating non-existing directory for bind mounting" + mkdir -p "${DIRECTORY}" + fi done BIND="" @@ -233,7 +237,11 @@ then do DIRECTORY="$(echo ${BIND_RO} | awk -F: '{ print $1 }')" - mkdir -p "${DIRECTORY}" + if [ ! -e "${DIRECTORY}" ] + then + echo "'${DIRECTORY}': creating non-existing directory for bind-ro mounting" + mkdir -p "${DIRECTORY}" + fi done BIND_RO="" -- cgit v1.2.3