/* 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);