cube-ctl: fix regression with c3 add and btrfs subvol creation

The commit e9e8c92d3a (cube-ctl:
Optimize "c3 add" instantiation time) caused the btrfs sub volume code
to stop working because it was checking for the existence of the wrong
directory.

It should have checked out_dir=/opt/container + the container name.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
This commit is contained in:
Jason Wessel
2018-04-20 08:30:57 -07:00
committed by Bruce Ashfield
parent 5d0d26473b
commit 2542e6804e

View File

@@ -1095,7 +1095,7 @@ case "${cmd}" in
out_dir="${container_dir}/"
fi
if [ -n "${track_containers}" -a ! -e ${out_dir} ]; then
if [ -n "${track_containers}" -a ! -e ${out_dir}${container_name} ]; then
${SBINDIR}/overc-ctl subvol ${container_name} -o ${out_dir}
fi
mkdir -p "${out_dir}/${container_name}/rootfs"