]> git.ipfire.org Git - thirdparty/lxc.git/commit
Make mount paths relative to rootfs
authorMichael Tokarev <mjt@tls.msk.ru>
Fri, 17 Dec 2010 10:43:36 +0000 (11:43 +0100)
committerDaniel Lezcano <dlezcano@fr.ibm.com>
Fri, 17 Dec 2010 10:43:36 +0000 (11:43 +0100)
commit59760f5d0f441c4d5ce165498abadcbd7409e9bb
treeb0d6138febaf4f83c32fa5c799e946476cf43d6f
parent968fbd36057db3132c68a63700e42929e5df5e2d
Make mount paths relative to rootfs

Why not chdir into the root of container right when
the root filesystem is (bind-)mounted, and let all
mount entries to be relative to the container root?

Even more, to warn if lxc.mount[.entry] contains
absolute path for the destination directory (or a
variation of this, absolute and does not start with
container root mount point)?

This way, all mounts will look much more sane, and
it will be much easier to move/clone containers -
by changing only lxc.rootfs.

I do it this way locally since the beginning, by
chdir'ing to the proper directory (rootfs) before
running lxc-start (in a startup script), but this
is now broken in 0.7.3 which bind-mounts rootfs
somewhere in /usr/lib/lxc.

Signed-off-by: Michael Tokarev<mjt@tls.msk.ru>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
src/lxc/conf.c