From: Holger Amann Date: Wed, 19 Mar 2014 06:06:13 +0000 (+0100) Subject: debian: Symlink /etc/mtab X-Git-Tag: lxc-1.1.0.alpha1~201 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=23e880832b90190563b01fdd73fdcd5948492e52;p=thirdparty%2Flxc.git debian: Symlink /etc/mtab /etc/mtab doesn’t exist after bootstrapping a debian container, and will be created as regular file after first start. That leads to at least two errors: - output of `mount` is wrong and get messed up the more often you start/stop the container - /dev/pts/ptmx has wrong permissions Signed-off-by: Holger Amann Acked-by: Stéphane Graber --- diff --git a/templates/lxc-debian.in b/templates/lxc-debian.in index aadfe25f5..1c0123e13 100644 --- a/templates/lxc-debian.in +++ b/templates/lxc-debian.in @@ -72,6 +72,10 @@ p6::ctrlaltdel:/sbin/init 6 p0::powerfail:/sbin/init 0 EOF + # symlink mtab + [ -e "$rootfs/etc/mtab" ] && rm $rootfs/etc/mtab + ln -s /proc/self/mounts $rootfs/etc/mtab + # disable selinux in debian mkdir -p $rootfs/selinux echo 0 > $rootfs/selinux/enforce