[systemd-devel] RFC: idea for a pstore systemd service
Lennart Poettering
lennart at poettering.net
Wed Jan 16 18:30:36 UTC 2019
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
More information about the systemd-devel
mailing list