Avoid hard-coding the Azure image file format.

While here, avoid using OSRELEASE for the output
file name.

Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Glen Barber 2014-10-29 16:18:29 +00:00
parent d08ce983a7
commit f27438c752
3 changed files with 6 additions and 4 deletions

View file

@ -11,7 +11,7 @@ VMSIZE?= 20G
VMBASE?= vm
CLOUDWARE?= AZURE
AZURE_FORMAT= vhd
AZURE_FORMAT= vhdf
.if defined(WITH_CLOUDWARE) && !empty(WITH_CLOUDWARE) && !empty(CLOUDWARE)
. for _CW in ${CLOUDWARE}
@ -20,6 +20,7 @@ CLEANDIRS+= vm-${_CW:tl}
CLEANFILES+= ${_CW:tl}.img \
${_CW:tl}.${${_CW:tu}_FORMAT} \
${_CW:tl}.${${_CW:tu}_FORMAT}.raw
${_CW:tu}IMAGE= ${_CW:tl}.${${_CW:tu}_FORMAT}
. if exists(${.CURDIR}/tools/${_CW:tl}.conf) && !defined(${_CW:tu}CONF)
${_CW:tu}CONF?= ${.CURDIR}/tools/${_CW:tl}.conf
. endif
@ -59,7 +60,8 @@ vm-image: vm-base
vm-azure:
.if exists(${.CURDIR}/${TARGET}/mk-azure.sh)
env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} AZURECONF=${AZURECONF} \
AZURE_FORMAT=${AZURE_FORMAT} \
${.CURDIR}/${TARGET}/mk-azure.sh ${.TARGET} azure.img \
${WORLDDIR} ${.TARGET} ${VMSIZE} ${OSRELEASE}.vhd
${WORLDDIR} ${.TARGET} ${VMSIZE} ${AZUREIMAGE}
.endif
touch ${.TARGET}

View file

@ -132,7 +132,7 @@ vm_create_azure() {
echo "Creating image... Please wait."
mkimg -f vhdf -s gpt \
mkimg -f ${AZURE_FORMAT} -s gpt \
-b /boot/pmbr -p freebsd-boot/bootfs:=/boot/gptboot \
-p freebsd-swap/swapfs::1G \
-p freebsd-ufs/rootfs:=${VMBASE} \

View file

@ -132,7 +132,7 @@ vm_create_azure() {
echo "Creating image... Please wait."
mkimg -f vhdf -s gpt \
mkimg -f ${AZURE_FORMAT} -s gpt \
-b /boot/pmbr -p freebsd-boot/bootfs:=/boot/gptboot \
-p freebsd-swap/swapfs::1G \
-p freebsd-ufs/rootfs:=${VMBASE} \