From e6f3489c367f9bd0e9a6d58364eb1c2bcba38af1 Mon Sep 17 00:00:00 2001 From: Glen Barber Date: Sat, 8 Nov 2014 16:26:17 +0000 Subject: [PATCH] mount(8) and umount(8) devfs(5) as needed. Sponsored by: The FreeBSD Foundation --- release/tools/vmimage.subr | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr index 498299429932..64015b470610 100644 --- a/release/tools/vmimage.subr +++ b/release/tools/vmimage.subr @@ -79,8 +79,11 @@ vm_install_base() { echo '/dev/gpt/swapfs none swap sw 0 0' \ >> ${DESTDIR}/etc/fstab + mkdir -p ${DESTDIR}/dev + mount -t devfs devfs ${DESTDIR}/dev chroot ${DESTDIR} /usr/bin/newaliases chroot ${DESTDIR} /etc/rc.d/ldconfig forcestart + umount ${DESTDIR}/dev return 0 } @@ -104,12 +107,15 @@ vm_extra_enable_services() { } vm_extra_install_packages() { + mkdir -p ${DESTDIR}/dev + mount -t devfs devfs ${DESTDIR}/dev chroot ${DESTDIR} env ASSUME_ALWAYS_YES=yes \ /usr/sbin/pkg bootstrap -y if [ ! -z "${VM_EXTRA_PACKAGES}" ]; then chroot ${DESTDIR} env ASSUME_ALWAYS_YES=yes \ /usr/sbin/pkg install -y ${VM_EXTRA_PACKAGES} fi + umount ${DESTDIR}/dev return 0 }