summaryrefslogtreecommitdiffstats
path: root/src/run-generator/run-generator.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* generators: use generator_open_unit_file where appropriateMike Yuan2023-08-191-7/+5
|
* tree-wise: drop unnecessary use of proc_cmdline_key_streq()Yu Watanabe2023-08-081-1/+3
| | | | | | | If the key does not contain '-' or '_', then it is not necessary to use proc_cmdline_key_streq(), and streq() is sufficient. This also adds missing assertions about 'key' argument.
* tree-wide: allow ASCII fallback for → in logsDavid Tardon2022-06-281-1/+3
|
* strv: make iterator in STRV_FOREACH() declaread in the loopYu Watanabe2022-03-191-1/+0
| | | | This also avoids multiple evaluations in STRV_FOREACH_BACKWARDS()
* treewide: fix spellingJoerg Behrmann2021-02-241-1/+1
|
* tree-wide: use free_and_strdup_warn()Yu Watanabe2021-02-111-4/+2
|
* license: LGPL-2.1+ -> LGPL-2.1-or-laterYu Watanabe2020-11-091-1/+1
|
* core: use SPECIAL_DEFAULT_TARGET moreZbigniew Jędrzejewski-Szmek2019-11-281-1/+2
|
* headers: remove unneeded includes from util.hZbigniew Jędrzejewski-Szmek2019-03-271-0/+2
| | | | | This means we need to include many more headers in various files that simply included util.h before, but it seems cleaner to do it this way.
* generators: define custom main func definer and use it where applicableZbigniew Jędrzejewski-Szmek2018-12-121-15/+4
| | | | | | | | | | There should be no functional difference, except that the error message is changd from "three or no arguments" to "zero or three arguments". Somehow the inverted form always seemed strange. umask() call is also dropped from run-generator. I think it wasn't dropped in 053254e3cb215df3b8c905bc39b920f8817e1c7d because the run generator was merged around the same time.
* add new run-generatorLennart Poettering2018-11-271-0/+147
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.