From 438ef64c250a907c39a7d5d1bfd567b83e76a3c4 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Tue, 11 Mar 2014 14:03:12 +0100 Subject: [PATCH] boxes: Return in bash is only allowed in functions --- boxes/common/lxc-template | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/boxes/common/lxc-template b/boxes/common/lxc-template index b420c2a..1899ad3 100755 --- a/boxes/common/lxc-template +++ b/boxes/common/lxc-template @@ -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/