Implementing systemd-fsckd support in default plymouth themes.
Didier Roche
didrocks at ubuntu.com
Thu Feb 26 06:03:33 PST 2015
Hey,
I've implemented recently in systemd a system-fsckd service, reporting
to /dev/console and to plymouth themes the running fsck progress. There
is as well a cancel message that is transmitted. The feature has been
merged recently to systemd (commit
http://cgit.freedesktop.org/systemd/systemd/commit/?id=ac6e2f0dfc2e800f01c79ecea2b811914110a7b9
and followings) in the to be released systemd v220.
This is to mirror one feature we have in ubuntu (previously with
mountall), where user can discover and cancel if one or more fsck are
running.
The implementation is that we send a message telling that we support
Control+C to cancel running fsck. The form is:
"fsckd-cancel-msg:<localized_string>".
Then, we also send update status (through the update functionality)
everytime the number of devices under fsck or the progress changes:
"fsckd:<num_devices>:<percentage>:<localized_string>.
The localized_string is an string ready to be displayed for themes or
scripts who either don't support i18n or just want to display the
default strings. Other themes can match on the machine parsable data
like prefix "fsckd-cancel-msg" or "fsckd" + num_devices and percentages.
More information about the protocole is available at
http://man7.org/linux/man-pages/man8/systemd-fsckd.8.html
Here are attached 2 patches trying to do the minimum implementation for
a theme to display the fsck cancel message when needed, and hiding when
either the user cancel the fsck in progress or when the fsck are done.
One is for the script theme and the other for one C theme. Note that if
I'm correct, the C theme only support one message to be displayed,
contrary to the script one. Before going on and implementing similar
functionality to the other sets of default themes, I'm opened to any
feedback on what can be improved .
Cheers,
Didier
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Implement-systemd-fsckd-support-to-the-script-theme.patch
Type: text/x-diff
Size: 3850 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/plymouth/attachments/20150226/8de53356/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Implement-systemd-fsckd-support-to-solar-theme.patch
Type: text/x-diff
Size: 4635 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/plymouth/attachments/20150226/8de53356/attachment-0001.patch>
More information about the plymouth
mailing list