mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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:
parent
d08ce983a7
commit
f27438c752
3 changed files with 6 additions and 4 deletions
|
|
@ -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}
|
||||
|
|
|
|||
|
|
@ -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} \
|
||||
|
|
|
|||
|
|
@ -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} \
|
||||
|
|
|
|||
Loading…
Reference in a new issue