From: Lennart Poettering Date: Wed, 6 Dec 2017 20:42:36 +0000 (+0100) Subject: core: move write_container_id() invocation into initialize_runtime() X-Git-Tag: v236~47^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6c78f016d7329a2d387bcfc8b9b96f93e0e82b02;p=thirdparty%2Fsystemd.git core: move write_container_id() invocation into initialize_runtime() This moves the invocation a bit later, but that shoudln't matter. By moving it we gain two things: first of all, its closer to other code where it belongs, secondly its naturally conditioned properly, as we no longer will rewrite the container ID file on every reexecution again, and not in test mode either. --- diff --git a/src/core/main.c b/src/core/main.c index 5e03ec28dc2..f04ec504228 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -1870,8 +1870,8 @@ static int initialize_runtime( machine_id_setup(NULL, arg_machine_id, NULL); loopback_setup(); bump_unix_max_dgram_qlen(); - test_usr(); + write_container_id(); } if (arg_system && arg_runtime_watchdog > 0 && arg_runtime_watchdog != USEC_INFINITY) @@ -2307,8 +2307,6 @@ int main(int argc, char *argv[]) { if (v > 0) log_info("Detected virtualization %s.", virtualization_to_string(v)); - write_container_id(); - log_info("Detected architecture %s.", architecture_to_string(uname_architecture())); if (in_initrd())