Ensure that mtab is properly linked to /proc/mounts in binary_virtual-hdd.

This commit is contained in:
Alexander Sack 2010-07-02 14:24:16 +02:00 committed by Daniel Baumann
parent 2ecf2d0376
commit a0239ef94b
1 changed files with 7 additions and 0 deletions

View File

@ -70,6 +70,13 @@ if [ "${LH_BUILD_WITH_CHROOT}" = "true" ]
then
mv binary-virtual.img chroot
# hack to recreate mtab from chroot_hacks if its gone for some reason
if ! Chroot chroot "test -s /etc/mtab"
then
Chroot chroot "rm -f /etc/mtab"
Chroot chroot "ln -s /proc/mounts /etc/mtab"
fi
case "${LH_BINARY_FILESYSTEM}" in
ext2)
Chroot chroot "mkfs.ext2 -F binary-virtual.img"