]> git.ipfire.org Git - thirdparty/systemd.git/commit
add new run-generator
authorLennart Poettering <lennart@poettering.net>
Thu, 15 Nov 2018 21:09:29 +0000 (22:09 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 27 Nov 2018 08:44:40 +0000 (09:44 +0100)
commit35a1ff4cfe82810e7f52db07b67793af8c54c9f6
tree35cbc5c1280160c509c794510ff4bb3c005b0804
parent7af67e9a8b1f10c6aaeff56910957907ef852cee
add new run-generator

This is really useful for running commands like this:

        # systemd-run -i someimage.raw -b systemd.run='"some command line"'

This will now run the command line inside a small Type=oneshot service
and even propagate the exit code of the command back to the parent. And
all that with the full system booted up.

By default this causes the system to shutdown right after the command
completed, but this can be tweaked with systemd.run_success_action= and
systemd.run_failure_action=.

Note that when used in VMs the exit status can of course not be
propagate, as VMs don't really know a concept for that.
meson.build
src/run-generator/run-generator.c [new file with mode: 0644]