mirror of
https://github.com/systemd/systemd.git
synced 2026-08-10 17:14:31 +00:00
run: refuse --no-block when combined with --scope
In the systemd-run --scope mode, --no-block has no actual effect and will be silently ignored. Therefore, this combination is explicitly rejected to reduce confusion for users when using it. Fixes: #42806
This commit is contained in:
committed by
Lennart Poettering
parent
afcc11d938
commit
48dc1bbd09
@@ -514,7 +514,7 @@
|
||||
<para>Do not synchronously wait for the unit start operation to finish. If this option is not specified, the
|
||||
start request for the transient unit will be verified, enqueued and <command>systemd-run</command> will wait
|
||||
until the unit's start-up is completed. By passing this argument, it is only verified and enqueued. This
|
||||
option may not be combined with <option>--wait</option>.</para>
|
||||
option may not be combined with <option>--wait</option> or <option>--scope</option>.</para>
|
||||
|
||||
<xi:include href="version-info.xml" xpointer="v220"/>
|
||||
</listitem>
|
||||
|
||||
@@ -694,6 +694,10 @@ static int parse_argv(int argc, char *argv[]) {
|
||||
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
|
||||
"--remain-after-exit and --service-type= are not supported in --scope mode.");
|
||||
|
||||
if (arg_scope && arg_no_block)
|
||||
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
|
||||
"--no-block is not supported in --scope mode.");
|
||||
|
||||
if (arg_stdio != ARG_STDIO_NONE) {
|
||||
if (with_trigger || arg_scope)
|
||||
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
|
||||
|
||||
Reference in New Issue
Block a user