diff options
Diffstat (limited to 'src/core/manager.c')
-rw-r--r-- | src/core/manager.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/core/manager.c b/src/core/manager.c index 0cb2044325..9d078c0af7 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -2476,6 +2476,9 @@ void manager_check_finished(Manager *m) { /* Turn off confirm spawn now */ m->confirm_spawn = false; + /* This is no longer the first boot */ + m->is_first_boot = false; + if (dual_timestamp_is_set(&m->finish_timestamp)) return; @@ -2628,6 +2631,7 @@ void manager_run_generators(Manager *m) { _cleanup_closedir_ DIR *d = NULL; const char *generator_path; const char *argv[5]; + const char *env[2]; int r; assert(m); @@ -2661,8 +2665,14 @@ void manager_run_generators(Manager *m) { argv[3] = m->generator_unit_path_late; argv[4] = NULL; + if (m->is_first_boot) { + env[0] = (char*) "SYSTEMD_FIRST_BOOT=1"; + env[1] = NULL; + } else + env[0] = NULL; + RUN_WITH_UMASK(0022) - execute_directory(generator_path, d, DEFAULT_TIMEOUT_USEC, (char**) argv); + execute_directory(generator_path, d, DEFAULT_TIMEOUT_USEC, (char**) argv, (char**) env); finish: trim_generator_dir(m, &m->generator_unit_path); |