vmimage.subr (7d565d608f2aed33566ed8e6dc371e42b626686e) | vmimage.subr (e6f3489c367f9bd0e9a6d58364eb1c2bcba38af1) |
---|---|
1#!/bin/sh 2# 3# $FreeBSD$ 4# 5# 6# Common functions for virtual machine image build scripts. 7# 8 --- 65 unchanged lines hidden (view full) --- 74 75 echo '# Custom /etc/fstab for FreeBSD VM images' \ 76 > ${DESTDIR}/etc/fstab 77 echo '/dev/gpt/rootfs / ufs rw 1 1' \ 78 >> ${DESTDIR}/etc/fstab 79 echo '/dev/gpt/swapfs none swap sw 0 0' \ 80 >> ${DESTDIR}/etc/fstab 81 | 1#!/bin/sh 2# 3# $FreeBSD$ 4# 5# 6# Common functions for virtual machine image build scripts. 7# 8 --- 65 unchanged lines hidden (view full) --- 74 75 echo '# Custom /etc/fstab for FreeBSD VM images' \ 76 > ${DESTDIR}/etc/fstab 77 echo '/dev/gpt/rootfs / ufs rw 1 1' \ 78 >> ${DESTDIR}/etc/fstab 79 echo '/dev/gpt/swapfs none swap sw 0 0' \ 80 >> ${DESTDIR}/etc/fstab 81 |
82 mkdir -p ${DESTDIR}/dev 83 mount -t devfs devfs ${DESTDIR}/dev |
|
82 chroot ${DESTDIR} /usr/bin/newaliases 83 chroot ${DESTDIR} /etc/rc.d/ldconfig forcestart | 84 chroot ${DESTDIR} /usr/bin/newaliases 85 chroot ${DESTDIR} /etc/rc.d/ldconfig forcestart |
86 umount ${DESTDIR}/dev |
|
84 85 return 0 86} 87 88vm_extra_install_base() { 89 # Prototype. When overridden, runs extra post-installworld commands 90 # as needed, based on the target virtual machine image or cloud 91 # provider image target. --- 7 unchanged lines hidden (view full) --- 99 echo ${_rcvar}_enable="YES" >> ${DESTDIR}/etc/rc.conf 100 done 101 fi 102 103 return 0 104} 105 106vm_extra_install_packages() { | 87 88 return 0 89} 90 91vm_extra_install_base() { 92 # Prototype. When overridden, runs extra post-installworld commands 93 # as needed, based on the target virtual machine image or cloud 94 # provider image target. --- 7 unchanged lines hidden (view full) --- 102 echo ${_rcvar}_enable="YES" >> ${DESTDIR}/etc/rc.conf 103 done 104 fi 105 106 return 0 107} 108 109vm_extra_install_packages() { |
110 mkdir -p ${DESTDIR}/dev 111 mount -t devfs devfs ${DESTDIR}/dev |
|
107 chroot ${DESTDIR} env ASSUME_ALWAYS_YES=yes \ 108 /usr/sbin/pkg bootstrap -y 109 if [ ! -z "${VM_EXTRA_PACKAGES}" ]; then 110 chroot ${DESTDIR} env ASSUME_ALWAYS_YES=yes \ 111 /usr/sbin/pkg install -y ${VM_EXTRA_PACKAGES} 112 fi | 112 chroot ${DESTDIR} env ASSUME_ALWAYS_YES=yes \ 113 /usr/sbin/pkg bootstrap -y 114 if [ ! -z "${VM_EXTRA_PACKAGES}" ]; then 115 chroot ${DESTDIR} env ASSUME_ALWAYS_YES=yes \ 116 /usr/sbin/pkg install -y ${VM_EXTRA_PACKAGES} 117 fi |
118 umount ${DESTDIR}/dev |
|
113 114 return 0 115} 116 117vm_extra_install_ports() { 118 # Prototype. When overridden, installs additional ports within the 119 # virtual machine environment. 120 --- 41 unchanged lines hidden --- | 119 120 return 0 121} 122 123vm_extra_install_ports() { 124 # Prototype. When overridden, installs additional ports within the 125 # virtual machine environment. 126 --- 41 unchanged lines hidden --- |