firmware: add a configuration file and fix prompt hint

This commit is contained in:
Franco Fichtner 2021-11-15 13:35:14 +01:00
parent d446a5909f
commit 2a4c3a4869
4 changed files with 7 additions and 2 deletions

1
plist
View File

@ -67,6 +67,7 @@
/usr/local/etc/opnsense-beep.d/low
/usr/local/etc/opnsense-beep.d/start
/usr/local/etc/opnsense-beep.d/stop
/usr/local/etc/opnsense-update.conf
/usr/local/etc/pkg/fingerprints/OPNsense/revoked/pkg.opnsense.org.20150402
/usr/local/etc/pkg/fingerprints/OPNsense/revoked/pkg.opnsense.org.20160104
/usr/local/etc/pkg/fingerprints/OPNsense/revoked/pkg.opnsense.org.20160630

View File

@ -0,0 +1,4 @@
# configuration for opnsense-update(8), do not edit
UPGRADE_HINT="FreeBSD:13:%%CORE_ARCH%%/22.1"
UPGRADE_RELEASE="22.1.b1"

View File

@ -5,7 +5,7 @@ seamless and can be performed right here from the web GUI.</p>
which will retain your settings (selecting "Import Configuration"), then
reformat the disk and apply a clean system (selecting "Guided Installation").</p>
<p>You can also upgrade via console / SSH by using option 12 from the menu by
typing "%%CORE_NEXT%%" when prompted.</p>
typing "%%UPGRADE_RELEASE%%" when prompted.</p>
<p>Make sure to read the migration notes and adjust for possible minor breaking
changes.</p>
<p>Please backup your configuration, preview the new version via live image or

View File

@ -338,8 +338,8 @@ fi
packages_is_size="$(opnsense-update -SRp)"
if [ -n "${packages_is_size}" ]; then
upgrade_major_message=$(cat /usr/local/opnsense/data/firmware/upgrade.html 2> /dev/null | sed 's/"/\\&/g' | tr '\n' ' ')
upgrade_major_version=$(opnsense-update -vR)
upgrade_major_message=$(sed -e 's/"/\\&/g' -e "s/%%UPGRADE_RELEASE%%/${upgrade_major_version}/g" /usr/local/opnsense/data/firmware/upgrade.html 2> /dev/null | tr '\n' ' ')
upgrade_needs_reboot="1"
sets_upgraded="{\"name\":\"packages\",\"size\":\"${packages_is_size}\",\"current_version\":\"${product_version}\",\"new_version\":\"${upgrade_major_version}\",\"repository\":\"${product_repo}\"}"