Skip to content

Commit

Permalink
firmware: shift away from old-style firmware-xxx files
Browse files Browse the repository at this point in the history
opnsense-update can read the upgrade hint itself.  We may have
to stash an ABI in there to reach to a different location without
the need to publish a symbolic link.

Move the firmware message to a data location for cleanliness.
  • Loading branch information
fichtner committed Sep 28, 2021
1 parent b9de69f commit 7063dc9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion plist
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@
/usr/local/opnsense/contrib/simplepie/phpunit.xml.dist
/usr/local/opnsense/contrib/tzdata/iso3166.tab
/usr/local/opnsense/contrib/tzdata/zone.tab
/usr/local/opnsense/data/firmware/upgrade.html
/usr/local/opnsense/data/proxy/template_error_pages/ERR_ACCESS_DENIED.html
/usr/local/opnsense/data/proxy/template_error_pages/ERR_ACL_TIME_QUOTA_EXCEEDED.html
/usr/local/opnsense/data/proxy/template_error_pages/ERR_AGENT_CONFIGURE.html
Expand Down Expand Up @@ -247,7 +248,6 @@
/usr/local/opnsense/data/proxy/template_error_pages/ERR_ZERO_SIZE_OBJECT.html
/usr/local/opnsense/data/proxy/template_error_pages/error-details.txt
/usr/local/opnsense/data/proxy/template_error_pages/errorpage.css
/usr/local/opnsense/firmware-message
/usr/local/opnsense/mvc/app/cache/README
/usr/local/opnsense/mvc/app/config/config.php
/usr/local/opnsense/mvc/app/config/loader.php
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions src/opnsense/scripts/firmware/check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,8 @@ fi

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

Expand Down

0 comments on commit 7063dc9

Please sign in to comment.