Commit Graph

4 Commits

Author SHA1 Message Date
Dan Bungert 7bdeb6707c os-prober: patch instead of sed 2022-01-12 13:33:07 -07:00
Michael Hudson-Doyle 132440451d more reliably restart client when server restarts
Splitting subiquity into server and client means that in general
old versions of the client can still be running when the server is
updated (the client running on tty1 will be restarted by snapd/systemd
when the snap is updated but clients running via e.g. ssh will not). I
implemented a way for the client to detect this and restart itself: the
server sets a header in all responses that indicates if it has been
updated. So far so good. But the way it knows that it has been updated
is to check the presence of a file that is only created when subiquity
itself triggers the refresh, so it's not there in the case of manual
refresh, and as reported in https://bugs.launchpad.net/bugs/1921820 this
can lead to the client crashing because it cannot parse the new server's
response. This simply changes to creating the marker file in the snap
post-refresh hook, which will be executed for manual snap refreshes as
well.

While I'm at it, remove the rest of the post-install hook that restarted
subiquity clients running on the serial line as the generic machinery
will work for these too.
2021-03-31 13:15:06 +13:00
Dimitri John Ledkov 616794857d
Stop subiquity-service on non-installer media. 2020-07-20 15:03:38 +01:00
Michael Hudson-Doyle 7571a4a8a2 add post-refresh hook to restart subiquity on the serial line
For https://bugs.launchpad.net/subiquity/+bug/1848182.

This was easy? As a bonus, the hook from the refreshed-to snap is
executed so this will work even when the user is running current media.
2019-10-17 13:43:39 +13:00