boxes: Return in bash is only allowed in functions
This commit is contained in:
parent
b0372a10c0
commit
438ef64c25
1 changed files with 2 additions and 5 deletions
|
@ -106,23 +106,20 @@ fi
|
||||||
# Unpack the rootfs
|
# Unpack the rootfs
|
||||||
echo "Unpacking the rootfs"
|
echo "Unpacking the rootfs"
|
||||||
|
|
||||||
|
|
||||||
(
|
(
|
||||||
flock -x 200
|
flock -x 200
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "Cache repository is busy."
|
echo "Cache repository is busy."
|
||||||
return 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p ${LXC_ROOTFS}
|
mkdir -p ${LXC_ROOTFS}
|
||||||
(cd ${LXC_ROOTFS} && tar xfz ${LXC_TARBALL} --strip-components=2)
|
(cd ${LXC_ROOTFS} && tar xfz ${LXC_TARBALL} --strip-components=2)
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "Failed to extract rootfs"
|
echo "Failed to extract rootfs"
|
||||||
return 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
return 0
|
|
||||||
|
|
||||||
) 200>/var/lock/subsys/lxc
|
) 200>/var/lock/subsys/lxc
|
||||||
|
|
||||||
mkdir -p ${LXC_ROOTFS}/dev/pts/
|
mkdir -p ${LXC_ROOTFS}/dev/pts/
|
||||||
|
|
Loading…
Reference in a new issue