[systemd-devel] [systemd-commits] 9 commits - configure.ac .gitignore Makefile.am Makefile-man.am man/systemd-fsckd.service.xml man/systemd-fsck at .service.xml po/de.po po/el.po po/fr.po po/hu.po po/it.po po/pl.po po/POTFILES.in po/pt_BR.po po/ru.po po/sv.po po/uk.po src/fsck src/fsckd src/shared test/mocks units/.gitignore units/systemd-fsckd.service.in units/systemd-fsckd.socket units/systemd-fsck-root.service.in units/systemd-fsck at .service.in

Didier Roche didrocks at ubuntu.com
Wed Mar 11 06:27:41 PDT 2015

Le 10/03/2015 11:55, Lennart Poettering a écrit :
> On Tue, 10.03.15 08:33, Martin Pitt (martin.pitt at ubuntu.com) wrote:
>> Lennart Poettering [2015-03-09 19:11 +0100]:
>>> Anyway, please look into fixing this, I am kinda relying on patches
>>> for this, as I don't use this myself. Fedora isn't set up for it, nor
>>> do I use a file system that still requires fsck at boot...
>> Yep, we'll fix those. But for the record, this can be tested easily
>> anywhere by replacing /usr/sbin/fsck with test/mocks/fsck (I'm on
>> btrfs myself..)
> Hmm, is there also a ply mocker? That would be good!

There is none AFAIK, I'm using plymouth-x11 which is working quite well. 
The only difficulty that I realized is that Control+C doesn't work for 
cancelling into that X window. Consequently, everytime I changed to "c" 
or any other key to test.
> Well, again: fsck should *not* 'forward'. It should not be bothered at
> all with processing stdout of the actual fsck tool at all. Instead it
> should open a AF_UNIX/SOCK_STREAM connection to fsckd, use shutdown()
> to close the read side, and then make the resulting fd the fd passed
> to fsck's -C parameter. That way, the fsck tool will pass the progress
> data *directly* to systemd-fsckd, and systemd-fsck will never see it
> at all!

The suggestion is now implemented in the attached patch. Please note 
that they rely on 0001-fsckd-Don-t-use-strjoina-on-gettext-call.patch 
(just posted a new version) and 
0002-fsckd-check-if-plymouth-is-running-before-attempting.patch (didn't 
change that one).

It should handle what you had your mind, still enabling cancellation 
through SIGTERM while removing the need for intermediates sockets.
Please note that I needed to open in systemd-fsck the socket in the 
fork() children part to be able to identify the right fsck pid. I thus 
used then an empty cmdline[] slot for this. Another way would be to 
build the command line in the fork() children call entirely of course. 
Not sure what you would prefer.

As always, I'm opened to any suggestion and hope that will satisfy your 
original vision more :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-fsckd-directly-connect-fsck-output-to-systemd-fsckd.patch
Type: text/x-diff
Size: 18823 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150311/8c14643f/attachment.patch>

More information about the systemd-devel mailing list