aboutsummaryrefslogtreecommitdiff
path: root/release/tools/vmimage.subr
diff options
context:
space:
mode:
authorGlen Barber <gjb@FreeBSD.org>2014-11-08 16:26:17 +0000
committerGlen Barber <gjb@FreeBSD.org>2014-11-08 16:26:17 +0000
commite6f3489c367f9bd0e9a6d58364eb1c2bcba38af1 (patch)
tree0986d2ea89658070fc592b437903529fcbb1d904 /release/tools/vmimage.subr
parent7d565d608f2aed33566ed8e6dc371e42b626686e (diff)
downloadsrc-e6f3489c367f9bd0e9a6d58364eb1c2bcba38af1.tar.gz
src-e6f3489c367f9bd0e9a6d58364eb1c2bcba38af1.zip
mount(8) and umount(8) devfs(5) as needed.
Sponsored by: The FreeBSD Foundation
Notes
Notes: svn path=/projects/release-vmimage/; revision=274292
Diffstat (limited to 'release/tools/vmimage.subr')
-rw-r--r--release/tools/vmimage.subr6
1 files changed, 6 insertions, 0 deletions
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
}