summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDimitri John Ledkov <dimitri.j.ledkov@intel.com>2015-05-15 11:44:22 +0100
committerLennart Poettering <lennart@poettering.net>2015-05-15 12:49:33 +0200
commit304b3079a2039971db6d89f4557931776b758e41 (patch)
tree75b09022e91c461dd4312a1f2c9179a139f68346 /src
parentfe0272999c8ef7961a446a7743f824ba4cfe0918 (diff)
core: Execute first boot presets in an enable-only preset-mode.
This means any existing enabled units well be preserved and no pre-created symlinks will be removed. This is done on first boot, when the assumption is that /etc is not populated at all (no machine-id setup). For minimal containers that gives a significant first boot speed up, approximately ~20ms / ~16% in my trials.
Diffstat (limited to 'src')
-rw-r--r--src/core/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/main.c b/src/core/main.c
index 08e84d8304..c39815b106 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -1618,7 +1618,7 @@ int main(int argc, char *argv[]) {
bump_rlimit_nofile(&saved_rlimit_nofile);
if (empty_etc) {
- r = unit_file_preset_all(UNIT_FILE_SYSTEM, false, NULL, UNIT_FILE_PRESET_FULL, false, NULL, 0);
+ r = unit_file_preset_all(UNIT_FILE_SYSTEM, false, NULL, UNIT_FILE_PRESET_ENABLE_ONLY, false, NULL, 0);
if (r < 0)
log_warning_errno(r, "Failed to populate /etc with preset unit settings, ignoring: %m");
else