From: Ferenc Wagner Date: Fri, 11 Jun 2010 13:56:25 +0000 (+0200) Subject: change pivotdir default to mnt X-Git-Tag: lxc-0.7.0~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3103609ddc82f25061965ad0a0d3800c2a60f490;p=thirdparty%2Flxc.git change pivotdir default to mnt The mnt directory has a good chance to already exist in the new root filesystem, so creation and removal can be avoided. This also eases use of read only root filesystems (no configuration necessary). Signed-off-by: Ferenc Wagner Signed-off-by: Daniel Lezcano --- diff --git a/doc/lxc.conf.sgml.in b/doc/lxc.conf.sgml.in index 5f0cb678a..897c20429 100644 --- a/doc/lxc.conf.sgml.in +++ b/doc/lxc.conf.sgml.in @@ -416,7 +416,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA where to pivot the original root file system under , specified relatively to - that. The default is oldrootfs. + that. The default is mnt. It is created if necessary, and also removed after unmounting everything from it during container setup. diff --git a/src/lxc/conf.c b/src/lxc/conf.c index 9565d914d..596888214 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -545,7 +545,7 @@ static int setup_rootfs_pivot_root(const char *rootfs, const char *pivotdir) } if (!pivotdir) - pivotdir = "oldrootfs"; + pivotdir = "mnt"; /* create a default mountpoint if none specified */ snprintf(path, sizeof(path), "%s/%s", rootfs, pivotdir);