]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
nspawn: set container_host env vars before user arguments
authorLuca Boccassi <bluca@debian.org>
Sun, 19 Jul 2020 12:11:52 +0000 (13:11 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 20 Jul 2020 05:28:22 +0000 (07:28 +0200)
Allows users on the command line to seamlessly override
$container_host_* just like they can override $container_id and
$container

src/nspawn/nspawn.c

index 330bd7e7d296bb2fcf55f9fd099997b9c4c7da4a..3020ef975ce861b2c9f5f6574a143f0f63e47d53 100644 (file)
@@ -3191,7 +3191,7 @@ static int inner_child(
         if (asprintf((char **)(envp + n_env++), "NOTIFY_SOCKET=%s", NSPAWN_NOTIFY_SOCKET_PATH) < 0)
                 return log_oom();
 
-        env_use = strv_env_merge(3, envp, arg_setenv, os_release_pairs);
+        env_use = strv_env_merge(3, envp, os_release_pairs, arg_setenv);
         if (!env_use)
                 return log_oom();