summaryrefslogtreecommitdiff
path: root/helpers
diff options
context:
space:
mode:
authorAlexander Sack <asac@linaro.org>2010-07-02 14:24:16 +0200
committerDaniel Baumann <daniel@debian.org>2010-07-02 18:13:31 +0200
commit358baae4a442acc4124012bf6dd0431e7bc5e0f7 (patch)
tree5f4a5a4248dd5df161c2cf2fac9bf9bc18359a7c /helpers
parent9b8b0f72e1cfed2869db50c2da71eb7682e7f0a9 (diff)
downloadvyos-live-build-358baae4a442acc4124012bf6dd0431e7bc5e0f7.tar.gz
vyos-live-build-358baae4a442acc4124012bf6dd0431e7bc5e0f7.zip
Ensure that mtab is properly linked to /proc/mounts in binary_virtual-hdd.
Diffstat (limited to 'helpers')
-rwxr-xr-xhelpers/binary_virtual-hdd7
1 files changed, 7 insertions, 0 deletions
diff --git a/helpers/binary_virtual-hdd b/helpers/binary_virtual-hdd
index 4e61c6b99..aeb701ad4 100755
--- a/helpers/binary_virtual-hdd
+++ b/helpers/binary_virtual-hdd
@@ -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"