Using plymouth to install updates at startup time
hughsient at gmail.com
Sun Jun 3 06:20:05 PDT 2012
I'm the PackageKit dude, and I've been implementing
http://freedesktop.org/wiki/Software/systemd/OSUpgrade to be able to
have a GNOME 3.6 UI that looks like the mockups:
What works now?
* gnome-settings-daemon will automatically prepare the transaction
using PackageKit which in turns creates a
/var/lib/PackageKit/prepared-update file when ready
* if /var/lib/PackageKit/prepared-update exists then gnome-shell will
show a "Restart and install updates" option, that if clicked will call
pkexec pk-trigger-offline-update which creates /system-update and the
session is rebooted
* On next boot, if /system-update exists, then the systemd generator
starts system-update.target which in turn starts
packagekit-offline-update.service, which in turn makes PackageKit run
the prepared update transaction. On error, /system-update is removed,
and on success both /system-update and
/var/lib/PackageKit/prepared-update are removed.
So, how does this affect plymouth?
* Plymouth seems to be started already by the time that
system-update.target is started, I assume in --mode=boot
* I want to show a package icon (or something) with a widget that
fills up as the transactions are processed (0 to 100%)
* I want to show a message after the updates are applied like
"Rebooting after installing updates"
Now, for the second point, Ray tells me I should create a "plymouthd
--mode=updates" and then I figured I should send it messages of
completion possibly using "plymouth update-progress
--value=$percentage" or similar.
For the third point I probably want to do "plymouthd --mode=shutdown"
and set a message using "plymouth display-message --text=foo"
I'm kinda unsure how to change the "mode" of plymouthd -- do I have to
do something in systemd with service files and split up the existing
code, or can I do this from a "plymouth" command line invocation?
Thanks for any tips,
More information about the plymouth