vmimage.subr (65190700cb0f94560458a479cd30f921208deb28) | vmimage.subr (78b6117dac99c80fe618979fef4ef322b97415fa) |
---|---|
1#!/bin/sh 2# 3# 4# 5# Common functions for virtual machine image build scripts. 6# 7 8scriptdir=$(dirname $(realpath $0)) --- 225 unchanged lines hidden (view full) --- 234 if [ -z "${NOSWAP}" ]; then 235 SWAPOPT="-p freebsd-swap/swapfs::${SWAPSIZE}" 236 fi 237 238 if [ -n "${VM_BOOTPARTSOFFSET}" ]; then 239 BOOTPARTSOFFSET=":${VM_BOOTPARTSOFFSET}" 240 fi 241 | 1#!/bin/sh 2# 3# 4# 5# Common functions for virtual machine image build scripts. 6# 7 8scriptdir=$(dirname $(realpath $0)) --- 225 unchanged lines hidden (view full) --- 234 if [ -z "${NOSWAP}" ]; then 235 SWAPOPT="-p freebsd-swap/swapfs::${SWAPSIZE}" 236 fi 237 238 if [ -n "${VM_BOOTPARTSOFFSET}" ]; then 239 BOOTPARTSOFFSET=":${VM_BOOTPARTSOFFSET}" 240 fi 241 |
242 if [ -n "${CONFIG_DRIVE}" ]; then 243 CONFIG_DRIVE="-p freebsd/config-drive::${CONFIG_DRIVE_SIZE}" 244 fi 245 |
|
242 case "${VMFS}" in 243 ufs) 244 FSPARTTYPE=freebsd-ufs 245 X86GPTBOOTFILE=i386/gptboot/gptboot 246 ;; 247 zfs) 248 FSPARTTYPE=freebsd-zfs 249 X86GPTBOOTFILE=i386/gptzfsboot/gptzfsboot --- 57 unchanged lines hidden (view full) --- 307 308 echo "Building filesystem... Please wait." 309 buildfs 310 311 echo "Building final disk image... Please wait." 312 mkimg -s ${PARTSCHEME} -f ${VMFORMAT} \ 313 ${BOOTPARTS} \ 314 ${SWAPOPT} \ | 246 case "${VMFS}" in 247 ufs) 248 FSPARTTYPE=freebsd-ufs 249 X86GPTBOOTFILE=i386/gptboot/gptboot 250 ;; 251 zfs) 252 FSPARTTYPE=freebsd-zfs 253 X86GPTBOOTFILE=i386/gptzfsboot/gptzfsboot --- 57 unchanged lines hidden (view full) --- 311 312 echo "Building filesystem... Please wait." 313 buildfs 314 315 echo "Building final disk image... Please wait." 316 mkimg -s ${PARTSCHEME} -f ${VMFORMAT} \ 317 ${BOOTPARTS} \ 318 ${SWAPOPT} \ |
319 ${CONFIG_DRIVE} \ |
|
315 ${ROOTFSPART} \ 316 -o ${VMIMAGE} 317 318 echo "Disk image ${VMIMAGE} created." 319 320 if [ ${ESP} = "yes" ]; then 321 rm ${espfilename} 322 fi 323 324 return 0 325} 326 327vm_extra_create_disk() { 328 329 return 0 330} 331 | 320 ${ROOTFSPART} \ 321 -o ${VMIMAGE} 322 323 echo "Disk image ${VMIMAGE} created." 324 325 if [ ${ESP} = "yes" ]; then 326 rm ${espfilename} 327 fi 328 329 return 0 330} 331 332vm_extra_create_disk() { 333 334 return 0 335} 336 |