m->running_as = running_as;
m->exit_code = _MANAGER_EXIT_CODE_INVALID;
m->default_timer_accuracy_usec = USEC_PER_MINUTE;
- m->default_cpu_quota_period_usec = 100 * USEC_PER_MSEC;
m->idle_pipe[0] = m->idle_pipe[1] = m->idle_pipe[2] = m->idle_pipe[3] = -1;
/* 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;
_cleanup_closedir_ DIR *d = NULL;
const char *generator_path;
const char *argv[5];
+ const char *env[2];
int r;
assert(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);