diff --git a/src/opnsense/scripts/firmware/upgrade.sh b/src/opnsense/scripts/firmware/upgrade.sh index 232f83068..885537f68 100755 --- a/src/opnsense/scripts/firmware/upgrade.sh +++ b/src/opnsense/scripts/firmware/upgrade.sh @@ -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