diff options
| -rw-r--r-- | perl-install/NEWS | 2 | ||||
| -rw-r--r-- | perl-install/install/NEWS | 2 | ||||
| -rw-r--r-- | perl-install/services.pm | 5 |
3 files changed, 7 insertions, 2 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS index bf6b6b697..eda051acf 100644 --- a/perl-install/NEWS +++ b/perl-install/NEWS @@ -1,3 +1,5 @@ +- eliminate unnecessary calls to 'systemctl is-enabled' in services::services() + o this reduces clutter in the installer log file - diskdrake: o fix partitioning wizard diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS index 8a127ab68..8dc5e75c4 100644 --- a/perl-install/install/NEWS +++ b/perl-install/install/NEWS @@ -1,3 +1,5 @@ +- eliminate unnecessary calls to 'systemctl is-enabled' in services::services() + o this reduces clutter in the installer log file - fix partitioning wizard Version 18.72 - 18 January 2026 diff --git a/perl-install/services.pm b/perl-install/services.pm index c2230351d..d7c219edc 100644 --- a/perl-install/services.pm +++ b/perl-install/services.pm @@ -375,14 +375,15 @@ sub _systemd_services() { my @services; log::explanations("Detected systemd. Using systemctl introspection."); foreach (run_program::rooted_get_stdout($::prefix, '/bin/systemctl', '--no-legend', '--no-pager', '--full', 'list-unit-files')) { - my ($name, $type) = m!^(\S+)\.(service|socket|timer)\s+(enabled|disabled|generated)!; + my ($name, $type, $status) = m!^(\S+)\.(service|socket|timer)\s+(enabled|disabled|generated)!; if ($name) { my $unit_name = "$name.$type"; # We only look at non-template, non-linked service files in /lib # We also check for any non-masked sysvinit files as these are # also handled by systemd if ($name !~ /.*\@$/g && (-e "$::prefix/lib/systemd/system/$unit_name" or -e "$::prefix/etc/rc.d/init.d/$name") && ! -l "$::prefix/lib/systemd/system/$unit_name") { - push @services, [ _list_name($name, $type), !!run_program::rooted($::prefix, '/bin/systemctl', '--quiet', 'is-enabled', "$unit_name") ]; + my $enabled = $status eq 'enabled' || $status eq 'generated' && !!run_program::rooted($::prefix, '/bin/systemctl', '--quiet', 'is-enabled', $unit_name); + push @services, [ _list_name($name, $type), $enabled ]; } } } |
