/* If this is the first boot, and we are in the host system, then preset everything */
UnitFilePresetMode mode =
ENABLE_FIRST_BOOT_FULL_PRESET ? UNIT_FILE_PRESET_FULL : UNIT_FILE_PRESET_ENABLE_ONLY;
+ InstallChange *changes = NULL;
+ size_t n_changes = 0;
- r = unit_file_preset_all(RUNTIME_SCOPE_SYSTEM, 0, NULL, mode, NULL, NULL);
+ CLEANUP_ARRAY(changes, n_changes, install_changes_free);
+
+ log_info("Applying preset policy.");
+ r = unit_file_preset_all(RUNTIME_SCOPE_SYSTEM, /* file_flags = */ 0,
+ /* root_dir = */ NULL, mode, &changes, &n_changes);
+ install_changes_dump(r, "preset", changes, n_changes, /* quiet = */ false);
if (r < 0)
log_full_errno(r == -EEXIST ? LOG_NOTICE : LOG_WARNING, r,
"Failed to populate /etc with preset unit settings, ignoring: %m");