This patch supports the scenario where a user wants to install a busybox container on a busybox host. When running the template, in order to change the root password, the template needs to do the chroot. On busybox-powered hosts, chroot is not part of the coreutils package - it's part of busybox. And the busybox implementation or chroot only works if it has /lib in the new root populated with the right binaries (or at least that's the solution I found to make it work). The temporarily bind-mounts /lib in the NEWROOT, chroots there, changes the password, goes back and unmounts. This set of operations is contained in a new MOUNT namespace, using the lxc-unshare call. Signed-off-by:Bogdan Purcareata <bogdan.purcareata@freescale.com> Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com>
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| Makefile.am | Loading commit data... | |
| lxc-alpine.in | Loading commit data... | |
| lxc-altlinux.in | Loading commit data... | |
| lxc-archlinux.in | Loading commit data... | |
| lxc-busybox.in | Loading commit data... | |
| lxc-debian.in | Loading commit data... | |
| lxc-fedora.in | Loading commit data... | |
| lxc-opensuse.in | Loading commit data... | |
| lxc-oracle.in | Loading commit data... | |
| lxc-sshd.in | Loading commit data... | |
| lxc-ubuntu-cloud.in | Loading commit data... | |
| lxc-ubuntu.in | Loading commit data... |