Skip to content
This repository has been archived by the owner on Nov 24, 2022. It is now read-only.

Commit

Permalink
Merge pull request #247 from fpletz/fix/base-template-bash-return
Browse files Browse the repository at this point in the history
boxes: Return in bash is only allowed in functions
  • Loading branch information
fgrehm committed Mar 11, 2014
2 parents b0372a1 + 438ef64 commit 735475d
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions boxes/common/lxc-template
Expand Up @@ -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/
Expand Down

0 comments on commit 735475d

Please sign in to comment.