<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 13, 2020 at 12:29 PM Michael Jones <<a href="mailto:mike@meshplusplus.com">mike@meshplusplus.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 13, 2020 at 3:58 AM Jo-Philipp Wich <<a href="mailto:jo@mein.io" target="_blank">jo@mein.io</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br> <br></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Stuff like umounting external disks, fsync / swapoff etc. come to mind as well<br>
which should be doable at this point.<br>
<br><br></blockquote><div><br></div><div>Right, that's also feasible.</div><div><br></div><div>In fact I don't see any code at all for unmounting existing filesystem mounts. Thanks for pointing that out.</div></div></div></blockquote><div><br></div><div><br></div><div>I think that it's also reasonable to have /sbin/upgraded, in its role as PID1, have some kind of safety valve on when the upgrade has failed.</div><div><br></div><div>E.g. if /lib/upgrade/script2 has returned, at all, the system needs to reboot, because at this point /sbin/upgraded should be the only process running.</div><div><br></div><div>if /lib/upgrade/script2 has not returned after 1 hour, there's no chance that the upgrade will succeed, so reboot. </div><div><br></div><div>In both situations, the board may be in a bad state. But there's nothing that can be done.</div><div><br></div><div>/sbin/upgraded offers the user no CLI interactions at all, so there's no recovery actions that could be taken even if there was a UART / Serial / VGA + Keyboard connection to the board to allow user interaction.</div></div></div>