vmimage.subr (144d107fcd0859d2133a35d26de0559bb3b7c957) | vmimage.subr (38d59ac708a5f97be0d539379ca725490a9a6f21) |
---|---|
1#!/bin/sh 2# 3# $FreeBSD$ 4# 5# 6# Common functions for virtual machine image build scripts. 7# 8 9export PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin" 10trap "cleanup" INT QUIT TRAP ABRT TERM 11 12write_partition_layout() { 13 14 case "${TARGET}:${TARGET_ARCH}" in 15 amd64:amd64 | i386:i386) 16 mkimg -f gpt -b /boot/pmbr \ 17 -p freebsd-boot/bootfs:=/boot/gptboot \ 18 -p freebsd-swap/swapfs::1G \ | 1#!/bin/sh 2# 3# $FreeBSD$ 4# 5# 6# Common functions for virtual machine image build scripts. 7# 8 9export PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin" 10trap "cleanup" INT QUIT TRAP ABRT TERM 11 12write_partition_layout() { 13 14 case "${TARGET}:${TARGET_ARCH}" in 15 amd64:amd64 | i386:i386) 16 mkimg -f gpt -b /boot/pmbr \ 17 -p freebsd-boot/bootfs:=/boot/gptboot \ 18 -p freebsd-swap/swapfs::1G \ |
19 -p freebsd-ufs/rootfs:=${VMBASE} | 19 -p freebsd-ufs/rootfs:=${VMBASE} \ |
20 -o ${VMIMAGE} 21 ;; 22 powerpc:powerpc*) 23 mkimg -f apm \ 24 -p freebsd-boot/bootfs:=/boot/boot1.hfs \ 25 -p freebsd-swap/swapfs::1G \ | 20 -o ${VMIMAGE} 21 ;; 22 powerpc:powerpc*) 23 mkimg -f apm \ 24 -p freebsd-boot/bootfs:=/boot/boot1.hfs \ 25 -p freebsd-swap/swapfs::1G \ |
26 -p freebsd-ufs/rootfs:=${VMBASE} | 26 -p freebsd-ufs/rootfs:=${VMBASE} \ |
27 -o ${VMIMAGE} 28 ;; 29 *) 30 # ENOTSUPP 31 return 1 32 ;; 33 esac 34 --- 106 unchanged lines hidden (view full) --- 141 fi 142 sleep 1 143 done 144 145 return 0 146} 147 148vm_create_disk() { | 27 -o ${VMIMAGE} 28 ;; 29 *) 30 # ENOTSUPP 31 return 1 32 ;; 33 esac 34 --- 106 unchanged lines hidden (view full) --- 141 fi 142 sleep 1 143 done 144 145 return 0 146} 147 148vm_create_disk() { |
149 if [ -z "${mkimg_paritions}" ]; then 150 err "No partition types specified. Skipping." 151 return 1 152 fi | |
153 echo "Creating image... Please wait." 154 echo 155 156 write_partition_layout || return 1 157 158 return 0 159} 160 161vm_extra_create_disk() { 162 163 return 0 164} 165 | 149 echo "Creating image... Please wait." 150 echo 151 152 write_partition_layout || return 1 153 154 return 0 155} 156 157vm_extra_create_disk() { 158 159 return 0 160} 161 |