summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2014-06-16 15:59:21 (GMT)
committerSam Thursfield <sam.thursfield@codethink.co.uk>2014-06-16 15:59:58 (GMT)
commit352b10b0dcebc1156bcb9b5f79b525be013d87cd (patch)
tree2707c443abb882a73886acfeb3d379b48e9acec7
parent30d769598971e46332e5a9e55913f12c25be96ba (diff)
downloadbaserock-chroot-352b10b0dcebc1156bcb9b5f79b525be013d87cd.tar.gz
Fix strange error when /opt/baserock/chroots directory is missing
Create the directory if missing to avoid this when doing `manage-baserock add` mktemp: failed to create directory via template ‘/opt/baserock/chroots/tmp.XXXXXXXXXX’: No such file or directory
-rwxr-xr-xmanage-baserock2
1 files changed, 2 insertions, 0 deletions
diff --git a/manage-baserock b/manage-baserock
index f9d646a..0ac0aee 100755
--- a/manage-baserock
+++ b/manage-baserock
@@ -66,6 +66,8 @@ case "${ACTION}" in
exit 1
fi
+ mkdir -p ${BASEROCK_BASE}
+
TEMP_BASE=$(mktemp -d --tmpdir="${BASEROCK_BASE}")
cleanup () { rm -rf "${TEMP_BASE}"; }
trap cleanup 0