mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 00:07:26 +00:00
firmware: let opnsense-update -u stage the kernel as well
And only replace kernel if the pre-upgrade hook went ok.
This commit is contained in:
parent
ea8338767d
commit
41b5e641cf
@ -37,13 +37,15 @@ echo "***GOT REQUEST TO UPGRADE***" >> ${LOCKFILE}
|
||||
echo "Currently running $(opnsense-version) at $(date)" >> ${LOCKFILE}
|
||||
|
||||
${TEE} ${LOCKFILE} < ${PIPEFILE} &
|
||||
# XXX kernel is not rolled back at the moment, might have to add -K
|
||||
if opnsense-update -u > ${PIPEFILE} 2>&1; then
|
||||
${TEE} ${LOCKFILE} < ${PIPEFILE} &
|
||||
if /usr/local/etc/rc.syshook upgrade > ${PIPEFILE} 2>&1; then
|
||||
echo '***REBOOT***' >> ${LOCKFILE}
|
||||
sleep 5
|
||||
/usr/local/etc/rc.reboot
|
||||
${TEE} ${LOCKFILE} < ${PIPEFILE} &
|
||||
if opnsense-update -K > ${PIPEFILE} 2>&1; then
|
||||
echo '***REBOOT***' >> ${LOCKFILE}
|
||||
sleep 5
|
||||
/usr/local/etc/rc.reboot
|
||||
fi
|
||||
fi
|
||||
|
||||
# aboort pending upgrades
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user