firmware: pre-upgrade hook #6594

Make sure we are ready for reboot with kernel replaced but
not yet booted.  This way we can run the migration in the
last possible correct spot.  We might even abort on errors
here which might be handy to catch issues... to be discussed.
This commit is contained in:
Franco Fichtner 2023-06-05 12:36:34 +02:00
parent af5834600c
commit cea3afd44c

View File

@ -38,6 +38,8 @@ echo "Currently running $(opnsense-version) at $(date)" >> ${LOCKFILE}
${TEE} ${LOCKFILE} < ${PIPEFILE} &
if opnsense-update -u > ${PIPEFILE} 2>&1; then
/usr/local/etc/rc.syshook upgrade
echo '***REBOOT***' >> ${LOCKFILE}
sleep 5
/usr/local/etc/rc.reboot