Merge pull request #447 from hsoft/unprivileged-template
lxc-template: make runnable by unprivileged users
This commit is contained in:
commit
c8801ba8b2
1 changed files with 4 additions and 4 deletions
|
@ -110,7 +110,6 @@ fi
|
||||||
# Unpack the rootfs
|
# Unpack the rootfs
|
||||||
echo "Unpacking the rootfs"
|
echo "Unpacking the rootfs"
|
||||||
|
|
||||||
mkdir -p /var/lock/subsys
|
|
||||||
(
|
(
|
||||||
flock -x 200
|
flock -x 200
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
|
@ -119,13 +118,14 @@ mkdir -p /var/lock/subsys
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p ${LXC_ROOTFS}
|
mkdir -p ${LXC_ROOTFS}
|
||||||
(cd ${LXC_ROOTFS} && tar xfz ${LXC_TARBALL} --strip-components=${LXC_STRIP_COMPONENTS} --xattrs --xattrs-include=*)
|
(cd ${LXC_ROOTFS} && tar xfz ${LXC_TARBALL} --strip-components=${LXC_STRIP_COMPONENTS} --xattrs --xattrs-include=* || true)
|
||||||
if [ $? -ne 0 ]; then
|
if [ ! -f ${LXC_ROOTFS}/bin/true ]; then
|
||||||
echo "Failed to extract rootfs"
|
echo "Failed to extract rootfs"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
) 200>/var/lock/subsys/lxc
|
) 200>${LXC_PATH}/vagrant_lock
|
||||||
|
rm ${LXC_PATH}/vagrant_lock
|
||||||
|
|
||||||
mkdir -p ${LXC_ROOTFS}/dev/pts/
|
mkdir -p ${LXC_ROOTFS}/dev/pts/
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue