vmimage.subr (30a20c89bf905f464bf62a3904e74802fb86b80d) | vmimage.subr (a4900ff5a54937813a00feb0f3f157a0c432dc3d) |
---|---|
1#!/bin/sh 2# 3# $FreeBSD$ 4# 5# 6# Common functions for virtual machine image build scripts. 7# 8 --- 100 unchanged lines hidden (view full) --- 109 echo ${_rcvar}_enable="YES" >> ${DESTDIR}/etc/rc.conf 110 done 111 fi 112 113 return 0 114} 115 116vm_extra_install_packages() { | 1#!/bin/sh 2# 3# $FreeBSD$ 4# 5# 6# Common functions for virtual machine image build scripts. 7# 8 --- 100 unchanged lines hidden (view full) --- 109 echo ${_rcvar}_enable="YES" >> ${DESTDIR}/etc/rc.conf 110 done 111 fi 112 113 return 0 114} 115 116vm_extra_install_packages() { |
117 if [ -z "${VM_EXTRA_PACKAGES}" ]; then 118 return 0 119 fi |
|
117 mkdir -p ${DESTDIR}/dev 118 mount -t devfs devfs ${DESTDIR}/dev 119 chroot ${DESTDIR} env ASSUME_ALWAYS_YES=yes \ 120 /usr/sbin/pkg bootstrap -y | 120 mkdir -p ${DESTDIR}/dev 121 mount -t devfs devfs ${DESTDIR}/dev 122 chroot ${DESTDIR} env ASSUME_ALWAYS_YES=yes \ 123 /usr/sbin/pkg bootstrap -y |
121 if [ ! -z "${VM_EXTRA_PACKAGES}" ]; then | |
122 chroot ${DESTDIR} env ASSUME_ALWAYS_YES=yes \ 123 /usr/sbin/pkg install -y ${VM_EXTRA_PACKAGES} | 124 chroot ${DESTDIR} env ASSUME_ALWAYS_YES=yes \ 125 /usr/sbin/pkg install -y ${VM_EXTRA_PACKAGES} |
124 fi | |
125 umount ${DESTDIR}/dev 126 127 return 0 128} 129 130vm_extra_install_ports() { 131 # Prototype. When overridden, installs additional ports within the 132 # virtual machine environment. 133 134 return 0 135} 136 137vm_extra_pre_umount() { 138 # Prototype. When overridden, installs additional ports within the 139 # virtual machine environment. 140 | 126 umount ${DESTDIR}/dev 127 128 return 0 129} 130 131vm_extra_install_ports() { 132 # Prototype. When overridden, installs additional ports within the 133 # virtual machine environment. 134 135 return 0 136} 137 138vm_extra_pre_umount() { 139 # Prototype. When overridden, installs additional ports within the 140 # virtual machine environment. 141 |
142 if [ -e ${DESTDIR}/usr/local/sbin/pkg ]; then 143 chroot ${DESTDIR} env ASSUME_ALWAYS_YES=yes \ 144 /usr/local/sbin/pkg clean -y -a 145 fi |
|
141 rm -f ${DESTDIR}/etc/resolv.conf 142 143 return 0 144} 145 146vm_umount_base() { 147 i=0 148 sync --- 28 unchanged lines hidden --- | 146 rm -f ${DESTDIR}/etc/resolv.conf 147 148 return 0 149} 150 151vm_umount_base() { 152 i=0 153 sync --- 28 unchanged lines hidden --- |