From cea3afd44c73b8ccab90ab80ef1f30a8b4edfd8b Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Mon, 5 Jun 2023 12:36:34 +0200 Subject: [PATCH] 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. --- src/opnsense/scripts/firmware/upgrade.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/opnsense/scripts/firmware/upgrade.sh b/src/opnsense/scripts/firmware/upgrade.sh index 963b5aa2d..bc57fc7a2 100755 --- a/src/opnsense/scripts/firmware/upgrade.sh +++ b/src/opnsense/scripts/firmware/upgrade.sh @@ -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