Merge pull request #247 from fpletz/fix/base-template-bash-return

boxes: Return in bash is only allowed in functions
This commit is contained in:
Fabio Rehm 2014-03-11 11:02:24 -03:00
commit 735475d333

View file

@ -106,23 +106,20 @@ fi
# Unpack the rootfs
echo "Unpacking the rootfs"
(
flock -x 200
if [ $? -ne 0 ]; then
echo "Cache repository is busy."
return 1
exit 1
fi
mkdir -p ${LXC_ROOTFS}
(cd ${LXC_ROOTFS} && tar xfz ${LXC_TARBALL} --strip-components=2)
if [ $? -ne 0 ]; then
echo "Failed to extract rootfs"
return 1
exit 1
fi
return 0
) 200>/var/lock/subsys/lxc
mkdir -p ${LXC_ROOTFS}/dev/pts/