Merge pull request #411 from ccope/preserve-xattrs

Preserve xattrs in container rootfs
This commit is contained in:
Cam Cope 2016-06-02 00:16:40 -07:00
commit 62535b6465
2 changed files with 2 additions and 1 deletions

View file

@ -19,6 +19,7 @@ to see it in action.
* [Vagrant 1.5+](http://www.vagrantup.com/downloads.html) (tested with 1.7.2) * [Vagrant 1.5+](http://www.vagrantup.com/downloads.html) (tested with 1.7.2)
* lxc 0.7.5+ * lxc 0.7.5+
* tar 1.27 (the lxc-template script uses the --xattrs option)
* `redir` (if you are planning to use port forwarding) * `redir` (if you are planning to use port forwarding)
* `brctl` (if you are planning to use private networks, on Ubuntu this means `apt-get install bridge-utils`) * `brctl` (if you are planning to use private networks, on Ubuntu this means `apt-get install bridge-utils`)
* A [kernel != 3.5.0-17.28](https://github.com/fgrehm/vagrant-lxc/wiki/Troubleshooting#wiki-im-unable-to-restart-containers) * A [kernel != 3.5.0-17.28](https://github.com/fgrehm/vagrant-lxc/wiki/Troubleshooting#wiki-im-unable-to-restart-containers)

View file

@ -124,7 +124,7 @@ 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}) (cd ${LXC_ROOTFS} && tar xfz ${LXC_TARBALL} --strip-components=${LXC_STRIP_COMPONENTS} --xattrs --xattrs-include=*)
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "Failed to extract rootfs" echo "Failed to extract rootfs"
exit 1 exit 1