summaryrefslogtreecommitdiffstats
path: root/lib/container/start
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2018-01-19 09:53:32 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2018-01-19 09:53:46 +0000
commit148ade883d98e7f72f2a3fd01862922d4b49f90c (patch)
tree430798cc2fb16b875ee4f51e118d2f365e21797f /lib/container/start
parentReleasing debian version 20171101-1. (diff)
downloadopen-infrastructure-compute-tools-148ade883d98e7f72f2a3fd01862922d4b49f90c.tar.xz
open-infrastructure-compute-tools-148ade883d98e7f72f2a3fd01862922d4b49f90c.zip
Merging upstream version 20180118.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-xlib/container/start14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/container/start b/lib/container/start
index 566b4b0..ca88af2 100755
--- a/lib/container/start
+++ b/lib/container/start
@@ -3,6 +3,8 @@
# container-tools - Manage systemd-nspawn containers
# Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
+# SPDX-License-Identifier: GPL-3.0+
+#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
@@ -210,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=""
@@ -231,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=""