diff options
-rw-r--r-- | man/systemctl.xml | 2 | ||||
-rw-r--r-- | meson.build | 3 | ||||
-rw-r--r-- | meson_options.txt | 2 | ||||
-rw-r--r-- | src/core/manager.c | 4 | ||||
-rw-r--r-- | src/systemctl/systemctl-list-unit-files.c | 2 | ||||
-rw-r--r-- | src/systemctl/systemctl-show.c | 8 |
6 files changed, 14 insertions, 7 deletions
diff --git a/man/systemctl.xml b/man/systemctl.xml index ae0b046f7b..42dd667aa9 100644 --- a/man/systemctl.xml +++ b/man/systemctl.xml @@ -223,7 +223,7 @@ Sun 2017-02-26 20:57:49 EST 2h 3min left Sun 2017-02-26 11:56:36 EST 6h ago <programlisting>$ systemctl status bluetooth ● bluetooth.service - Bluetooth service - Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled) + Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; preset: enabled) Active: active (running) since Wed 2017-01-04 13:54:04 EST; 1 weeks 0 days ago Docs: man:bluetoothd(8) Main PID: 930 (bluetoothd) diff --git a/meson.build b/meson.build index 54f4b8f4aa..7db7e5ea1d 100644 --- a/meson.build +++ b/meson.build @@ -308,6 +308,8 @@ conf.set10('MEMORY_ACCOUNTING_DEFAULT', memory_accounting_ conf.set('STATUS_UNIT_FORMAT_DEFAULT', 'STATUS_UNIT_FORMAT_' + status_unit_format_default.to_upper()) conf.set_quoted('STATUS_UNIT_FORMAT_DEFAULT_STR', status_unit_format_default) +conf.set10('FIRST_BOOT_FULL_PRESET', get_option('first-boot-full-preset')) + ##################################################################### cc = meson.get_compiler('c') @@ -4328,6 +4330,7 @@ foreach tuple : [ ['link-networkd-shared', get_option('link-networkd-shared')], ['link-timesyncd-shared', get_option('link-timesyncd-shared')], ['link-boot-shared', get_option('link-boot-shared')], + ['first-boot-full-preset'], ['fexecve'], ['standalone-binaries', get_option('standalone-binaries')], ['coverage', get_option('b_coverage')], diff --git a/meson_options.txt b/meson_options.txt index b42ae0d90b..adaedf3ce8 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -27,6 +27,8 @@ option('link-timesyncd-shared', type: 'boolean', description : 'link systemd-timesyncd and its helpers to libsystemd-shared.so') option('link-boot-shared', type: 'boolean', description : 'link bootctl and systemd-bless-boot against libsystemd-shared.so') +option('first-boot-full-preset', type: 'boolean', value: false, + description : 'during first boot, do full preset-all (default will be changed to true later)') option('static-libsystemd', type : 'combo', choices : ['false', 'true', 'pic', 'no-pic'], diff --git a/src/core/manager.c b/src/core/manager.c index 5453e5fa9b..9c0a686b2a 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -1728,7 +1728,9 @@ static void manager_preset_all(Manager *m) { return; /* If this is the first boot, and we are in the host system, then preset everything */ - r = unit_file_preset_all(LOOKUP_SCOPE_SYSTEM, 0, NULL, UNIT_FILE_PRESET_ENABLE_ONLY, NULL, 0); + UnitFilePresetMode mode = FIRST_BOOT_FULL_PRESET ? UNIT_FILE_PRESET_FULL : UNIT_FILE_PRESET_ENABLE_ONLY; + + r = unit_file_preset_all(LOOKUP_SCOPE_SYSTEM, 0, NULL, mode, NULL, 0); if (r < 0) log_full_errno(r == -EEXIST ? LOG_NOTICE : LOG_WARNING, r, "Failed to populate /etc with preset unit settings, ignoring: %m"); diff --git a/src/systemctl/systemctl-list-unit-files.c b/src/systemctl/systemctl-list-unit-files.c index 552e85a06b..fa7a789b28 100644 --- a/src/systemctl/systemctl-list-unit-files.c +++ b/src/systemctl/systemctl-list-unit-files.c @@ -54,7 +54,7 @@ static int output_unit_file_list(const UnitFileList *units, unsigned c) { _cleanup_(unit_file_presets_freep) UnitFilePresets presets = {}; int r; - table = table_new("unit file", "state", "vendor preset"); + table = table_new("unit file", "state", "preset"); if (!table) return log_oom(); diff --git a/src/systemctl/systemctl-show.c b/src/systemctl/systemctl-show.c index a757378614..36a0748c14 100644 --- a/src/systemctl/systemctl-show.c +++ b/src/systemctl/systemctl-show.c @@ -318,7 +318,7 @@ static void print_status_info( bool *ellipsized) { const char *active_on, *active_off, *on, *off, *ss, *fs; - const char *enable_on, *enable_off, *enable_vendor_on, *enable_vendor_off; + const char *enable_on, *enable_off, *preset_on, *preset_off; _cleanup_free_ char *formatted_path = NULL; usec_t timestamp; const char *path; @@ -331,7 +331,7 @@ static void print_status_info( format_active_state(i->active_state, &active_on, &active_off); format_enable_state(i->unit_file_state, &enable_on, &enable_off); - format_enable_state(i->unit_file_preset, &enable_vendor_on, &enable_vendor_off); + format_enable_state(i->unit_file_preset, &preset_on, &preset_off); const SpecialGlyph glyph = unit_active_state_to_glyph(unit_active_state_from_string(i->active_state)); @@ -366,8 +366,8 @@ static void print_status_info( on, strna(i->load_state), off, path, enable_on, i->unit_file_state, enable_off, - show_preset ? "; vendor preset: " : "", - enable_vendor_on, show_preset ? i->unit_file_preset : "", enable_vendor_off); + show_preset ? "; preset: " : "", + preset_on, show_preset ? i->unit_file_preset : "", preset_off); } else if (path) printf(" Loaded: %s%s%s (%s)\n", |