/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 <holger@sauspiel.de>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
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