]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
run: the --background= switch expects an argument
authorLennart Poettering <lennart@poettering.net>
Fri, 19 Jan 2024 22:41:24 +0000 (23:41 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Sat, 20 Jan 2024 01:10:46 +0000 (01:10 +0000)
We got this right when running as "uid0", but wrong when invoked under
"systemd-run". Let's fix that.

src/run/run.c

index 74e39a2ac1d3dd018e80421c14a7fe817cbd1b9a..c3313c6c529fae92641a7f62abe51895c573b46f 100644 (file)
@@ -297,7 +297,7 @@ static int parse_argv(int argc, char *argv[]) {
                 { "same-dir",           no_argument,       NULL, 'd'                    },
                 { "shell",              no_argument,       NULL, 'S'                    },
                 { "ignore-failure",     no_argument,       NULL, ARG_IGNORE_FAILURE     },
-                { "background",         no_argument,       NULL, ARG_BACKGROUND         },
+                { "background",         required_argument, NULL, ARG_BACKGROUND         },
                 {},
         };