Cleanup: Message to reboot appears before firmware upgrade is complete
Important notices
Before you add a new report, we ask you kindly to acknowledge the following:
- [x] I have read the contributing guide lines at https://github.com/opnsense/core/blob/master/CONTRIBUTING.md
- [x] I am convinced that my issue is new after having checked both open and closed issues at https://github.com/opnsense/core/issues?q=is%3Aissue
Describe the bug
When performing a firmware upgrade, the message "Please reboot." is printed in the diagnostic text area before the firmware upgrade completes. This could be dangerous if a user stops reading there and tries to reboot manually.
To Reproduce
Steps to reproduce the behavior:
- Go to 'System -> Firmware -> Updates'
- Click on 'Status -> check for updates'
- Go to the "Updates" tab, and perform an upgrade
- Watch the diagnostic text area / console output for the "Please reboot." message (after archive download, but before extraction)
Expected behavior
I would expect the message to appear after the upgrade completes.
Screenshots
Although unrelated, #7330 has the diagnostic text I'm describing in their issue description.
Relevant log files
See above
Additional context
I was performing an upgrade to 24.7_x from 24.1 I believe
See https://github.com/opnsense/core/blob/2ad84c1932644f7e9a76c32ae6599bcbd842247f/src/sbin/opnsense-importer#L386
It's a small issue but I'm happy to make the changes myself if they're not very large and I can get some direction (unfamiliar with the codebase ATM).
It's probably https://github.com/opnsense/update/blob/8e63174e25aa29dc78ff62ebc9fb6844026d0cae/src/update/opnsense-update.sh.in#L1084 at which point "please reboot" is as safe as it gets. Also the update window is annotated with:
https://github.com/opnsense/core/blob/9240c5a15cd3164cd745dbe4456fd0213f6eab0d/src/opnsense/mvc/app/views/OPNsense/Core/firmware.volt#L842
And judging by the number of reports regarding this so far which is about zero I don't know we need to do much here.
Cheers, Franco
Got it, it just really seemed like the upgrade was still in progress when that line got printed. And if it were unsafe, the user would have to react quickly to it and stop reading the rest of the output, which is unlikely. Closing