[systemd-devel] RFC: idea for a pstore systemd service

Eric DeVolder eric.devolder at oracle.com
Thu Feb 21 16:16:38 UTC 2019


On 1/16/19 12:30 PM, Lennart Poettering wrote:
> On Di, 15.01.19 23:39, Jóhann B. Guðmundsson (johannbg at gmail.com) wrote:
> 
>>
>> [Service]
>> ExecStart=/bin/bash -c '/usr/bin/mv -t /var/lib/pstore /sys/fs/pstore/*'
>> Restart=on-success
> 
> While this would certainly work, I think I'd prefer a version in C
> and not depend on an installed shell for this. I mean, so far systemd
> has been an excercise in keeping shell out of the default codepaths in
> the boot process...
> 
> Moreover, we want a recognizable journal message (i.e. one with
> MESSAGE_ID) to be generated when we move a file out of pstore, much
> like we have it for coredumps and so on, and as soon as you do more
> than just the basic "mv" it gets nastier and nastier to do this from
> shell, while it is easy from C.
> 
> Lennart
> 
> --
> Lennart Poettering, Red Hat
> 

Lennart,
As this is my first venture into systemd, I've spent some time looking 
into the source for coredump. I chose this as it was mentioned in this 
thread. As a I look at this source, I see how to create the journal 
entries (ie. when we move a file out of pstore), and other things are 
unclear. Some questions:

- if I were to start by copying and then modifying an existing systemd 
utility, would you recommend coredump, or something else?
- do you anticipate this pstore utility needing to handling the likes of 
acls, xattrs, fields, etc?
- would there be a need for the server that is in coredump?

I admit to these being really newbie questions, I apologize. If there is 
a recommended developer reading (my google searches turned up mostly 
user-perspective hits), I'd greatly appreciate a pointer.

Also, I have other tasks on my plate, so I am working on this but not as 
my sole priority. I ask for patience.

Thanks,
eric


More information about the systemd-devel mailing list