From 03aee8ad688a6f6526ae8a3a2ec7c273ec5f1e6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rn=20=C3=85ne=20de=20Jong?= Date: Sun, 29 May 2022 17:18:35 +0200 Subject: [PATCH] Mount dev after tarbombing --- opennebula-images/freebsd-build-opennebula-image.sh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/opennebula-images/freebsd-build-opennebula-image.sh b/opennebula-images/freebsd-build-opennebula-image.sh index d94bb81..31d9e8c 100755 --- a/opennebula-images/freebsd-build-opennebula-image.sh +++ b/opennebula-images/freebsd-build-opennebula-image.sh @@ -135,22 +135,19 @@ ln -s /usr/home "$ZFSTARGET/home" chmod 1777 "$ZFSTARGET/var/tmp" chmod 1777 "$ZFSTARGET/tmp" -# Mount dev in chroot -mkdir -p "$UFSTARGET/dev" -mount -t devfs devfs "$UFSTARGET/dev" - # Download and extract base system. dist_files="kernel.txz base.txz" dist_dir="/usr/freebsd-dist/$ARCH/$RELEASE" -mkdir -p "$dist_dir" "$UFSTARGET" +mkdir -p "$dist_dir" for f in $dist_files do fetch -m -o "$dist_dir/$f" "$DIST_BASE/$f" tar -C "$UFSTARGET" -xJf "$dist_dir/$f" done -# Avoid writing temporary files while building +# Mount dev and tmp in chroot +mount -t devfs devfs "$UFSTARGET/dev" mount_nullfs /tmp "$UFSTARGET/tmp" mount_nullfs /var/tmp "$UFSTARGET/var/tmp"