WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions vm/opnsense-vm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -578,9 +578,9 @@ fi
msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location."
msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}."
msg_info "Retrieving the URL for the OPNsense Qcow2 Disk Image"
URL="https://download.freebsd.org/releases/VM-IMAGES/14.2-RELEASE/amd64/Latest/FreeBSD-14.2-RELEASE-amd64.qcow2.xz"
URL="https://download.freebsd.org/releases/VM-IMAGES/14.3-RELEASE/amd64/Latest/FreeBSD-14.3-RELEASE-amd64.qcow2.xz"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not just this?

curl -s https://download.freebsd.org/releases/VM-IMAGES/ \
| grep -Eo '[0-9]+\.[0-9]+-RELEASE' \
| sort -V | tail -n1 \
| xargs -I{} echo "https://download.freebsd.org/releases/VM-IMAGES/{}/amd64/Latest/FreeBSD-{}-amd64.qcow2.xz"

give always the latest stable release (15.0)

msg_ok "Download URL: ${CL}${BL}${URL}${CL}"
curl -f#SL -o "$(basename "$URL")" "$URL"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-f#SL is correct

curl -fSL --progress-bar -o "$(basename "$URL")" "$URL"
echo -en "\e[1A\e[0K"
FILE=FreeBSD.qcow2
unxz -cv $(basename $URL) >${FILE}
Expand Down Expand Up @@ -732,4 +732,4 @@ if [ "$IP_ADDR" != "" ]; then
else
echo -e "${INFO}${YW} LAN IP was DHCP.${CL}"
echo -e "${INFO}${BGN}To find the IP login to the VM shell${CL}"
fi
fi