mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 00:54:41 +00:00
firmware: fold this down to the portable opnsense-update -X call
This commit is contained in:
parent
2921576302
commit
b8b3da07db
@ -1,5 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
URL="$(opnsense-update -X)/sets/bogons.txz"
|
||||
DESTDIR="/usr/local/etc"
|
||||
WORKDIR="/tmp/bogons"
|
||||
FETCH="fetch -qT 30"
|
||||
@ -7,19 +8,6 @@ RETRIES=3
|
||||
|
||||
COMMAND=${1}
|
||||
|
||||
CORE_ABI=$(opnsense-version -a)
|
||||
SYS_ABI=$(opnsense-verify -a)
|
||||
|
||||
# force amd64 here since bogons are not published elsewhere
|
||||
URLPREFIX="https://pkg.opnsense.org/${SYS_ABI%:*}:amd64/${CORE_ABI}"
|
||||
|
||||
if [ -n "$(opnsense-update -x)" ]; then
|
||||
# fix ABI mismatch for business mirror by using it directly
|
||||
URLPREFIX=$(opnsense-update -M)
|
||||
fi
|
||||
|
||||
URL="${URLPREFIX}/sets/bogons.txz"
|
||||
|
||||
echo "bogons update starting" | logger
|
||||
|
||||
while [ ${RETRIES} -gt 0 ]; do
|
||||
|
||||
@ -48,18 +48,7 @@ changelog_checksum()
|
||||
|
||||
changelog_url()
|
||||
{
|
||||
CORE_ABI=$(opnsense-version -x)
|
||||
SYS_ABI=$(opnsense-verify -a)
|
||||
|
||||
# force amd64 here since changelogs are not published elsewhere
|
||||
URLPREFIX="https://pkg.opnsense.org/${SYS_ABI%:*}:amd64/${CORE_ABI}"
|
||||
|
||||
if [ -n "$(opnsense-update -x)" ]; then
|
||||
# changelogs differ for business subscriptions
|
||||
URLPREFIX=$(opnsense-update -M)
|
||||
fi
|
||||
|
||||
echo "${URLPREFIX}/sets/changelog.txz"
|
||||
echo "$(opnsense-update -X)/sets/changelog.txz"
|
||||
}
|
||||
|
||||
changelog_fetch()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user