diff --git a/opennebula-images/freebsd-build-opennebula-image.sh b/opennebula-images/freebsd-build-opennebula-image.sh index 8051921..5161cbd 100755 --- a/opennebula-images/freebsd-build-opennebula-image.sh +++ b/opennebula-images/freebsd-build-opennebula-image.sh @@ -15,6 +15,10 @@ IMAGE_PATH_ZFS="freebsd-zfs-$RELEASE-$(date -I).img.qcow2" IMAGE_PATH_UFS="freebsd-ufs-$RELEASE-$(date -I).img.qcow2" IMAGE_SIZE=10G +# Comment out to simply use latest version +# Hash checking is disabled when specifying this +CLOUDSETUP_VERSION=1.1 + DIST_BASE="https://download.freebsd.org/ftp/releases/$ARCH/$RELEASE" ZPOOL=zroot ZPOOL_TMP="zinstalling" @@ -63,6 +67,12 @@ then else portsnap extract fi + +if [ -n "$CLOUDSETUP_VERSION" ] +then + sed -i .bak -e '/^PORTVERSION=/ s/[0-9]*\.[0-9]*/'"$CLOUDSETUP_VERSION/" /usr/ports/sysutils/firstboot-cloudsetup/Makefile + make -C /usr/ports/sysutils/firstboot-cloudsetup makesum +fi make -C /usr/ports/sysutils/firstboot-cloudsetup clean package CLOUDSETUP_VERSION="$(fgrep VERSION /usr/ports/sysutils/firstboot-cloudsetup/Makefile | cut -f2- | tr -d \\t)" CLOUDSETUP_PKG="/usr/ports/sysutils/firstboot-cloudsetup/work/pkg/firstboot-cloudsetup-${CLOUDSETUP_VERSION}.pkg"