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>2011-03-09 19:17:13 +0100
commita0239ef94b2f75c46558feb1399975f21e370111 (patch)
tree5f4a5a4248dd5df161c2cf2fac9bf9bc18359a7c /helpers
parent2ecf2d037655998b9eac44543b9a0b4714e960ec (diff)
downloadvyos-live-build-a0239ef94b2f75c46558feb1399975f21e370111.tar.gz
vyos-live-build-a0239ef94b2f75c46558feb1399975f21e370111.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"