From: Lennart Poettering Date: Fri, 15 Dec 2017 18:03:17 +0000 (+0100) Subject: main: add some more comments for the early initialization phase X-Git-Tag: v237~209^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F7665%2Fhead;p=thirdparty%2Fsystemd.git main: add some more comments for the early initialization phase --- diff --git a/src/core/main.c b/src/core/main.c index 34f651d6acf..c7174735638 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -2304,20 +2304,23 @@ int main(int argc, char *argv[]) { Manager *m = NULL; FDSet *fds = NULL; + /* SysV compatibility: redirect init → telinit */ redirect_telinit(argc, argv); + /* Take timestamps early on */ dual_timestamp_from_monotonic(&kernel_timestamp, 0); dual_timestamp_get(&userspace_timestamp); + /* Figure out whether we need to do initialize the system, or if we already did that because we are + * reexecuting */ skip_setup = early_skip_setup_check(argc, argv); - /* If we get started via the /sbin/init symlink then we are - called 'init'. After a subsequent reexecution we are then - called 'systemd'. That is confusing, hence let's call us - systemd right-away. */ + /* If we get started via the /sbin/init symlink then we are called 'init'. After a subsequent reexecution we + * are then called 'systemd'. That is confusing, hence let's call us systemd right-away. */ program_invocation_short_name = systemd; (void) prctl(PR_SET_NAME, systemd); + /* Save the original command line */ saved_argv = argv; saved_argc = argc;