mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 09:04:39 +00:00
firmware: use cannonical -p and -t update
opnsense-update can now handle it correctly and we save another invoke from here.
This commit is contained in:
parent
e321ab47a6
commit
1e4aac005a
@ -45,11 +45,18 @@ fi
|
||||
rm -f ${PIPEFILE}
|
||||
mkfifo ${PIPEFILE}
|
||||
|
||||
echo "***GOT REQUEST TO UPGRADE***" >> ${LOCKFILE}
|
||||
|
||||
if [ -z "${RELEASE}" ]; then
|
||||
# XXX essentially this is a copy of update.sh
|
||||
echo "***GOT REQUEST TO UPDATE***" >> ${LOCKFILE}
|
||||
|
||||
# figure out the release type from config
|
||||
SUFFIX="-$(pluginctl -g system.firmware.type)"
|
||||
if [ "${SUFFIX}" = "-" ]; then
|
||||
SUFFIX=
|
||||
fi
|
||||
|
||||
# upgrade all packages if possible
|
||||
(opnsense-update -p 2>&1) | ${TEE} ${LOCKFILE}
|
||||
(opnsense-update -pt "opnsense${SUFFIX}" 2>&1) | ${TEE} ${LOCKFILE}
|
||||
|
||||
# trigger a webgui restart to cope with changes
|
||||
(/usr/local/etc/rc.restart_webgui 2>&1) | ${TEE} ${LOCKFILE}
|
||||
@ -65,6 +72,9 @@ if [ -z "${RELEASE}" ]; then
|
||||
fi
|
||||
fi
|
||||
else
|
||||
# XXX essentially this is a copy of upgrade.sh
|
||||
echo "***GOT REQUEST TO UPGRADE***" >> ${LOCKFILE}
|
||||
|
||||
# upgrade to a major release
|
||||
${TEE} ${LOCKFILE} < ${PIPEFILE} &
|
||||
if opnsense-update -u > ${PIPEFILE} 2>&1; then
|
||||
|
||||
@ -38,11 +38,8 @@ if [ "${SUFFIX}" = "-" ]; then
|
||||
SUFFIX=
|
||||
fi
|
||||
|
||||
# update all installed packages
|
||||
opnsense-update -p >> ${PKG_PROGRESS_FILE} 2>&1
|
||||
|
||||
# change the release type
|
||||
opnsense-update -t "opnsense${SUFFIX}" >> ${PKG_PROGRESS_FILE} 2>&1
|
||||
# upgrade all packages if possible
|
||||
opnsense-update -pt "opnsense${SUFFIX}" >> ${PKG_PROGRESS_FILE} 2>&1
|
||||
|
||||
# restart the web server
|
||||
/usr/local/etc/rc.restart_webgui >> ${PKG_PROGRESS_FILE} 2>&1
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user