From 4846df45d24880a8b4d0ca82b2d179b17b4e80c2 Mon Sep 17 00:00:00 2001 From: Pascal Terjan Date: Fri, 7 Aug 2020 20:19:00 +0000 Subject: Add --plain to systemctl list-units Since systemd 246 it adds some characters at the beginning of the line which break parsing when --plain is not set (mga#27046) --- perl-install/services.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'perl-install/services.pm') diff --git a/perl-install/services.pm b/perl-install/services.pm index 29593c9b2..1aab437a1 100644 --- a/perl-install/services.pm +++ b/perl-install/services.pm @@ -367,7 +367,7 @@ sub _systemd_services() { # Running system using systemd log::explanations("Detected systemd running. Using systemctl introspection."); # even if systemd is not running, we can detect status of shorewell service which is not wanted by: - my @opts = $::isInstall ? 'list-unit-files' : qw(--all list-units); + my @opts = $::isInstall ? 'list-unit-files' : qw(--all --plain list-units); foreach (run_program::rooted_get_stdout($::prefix, '/bin/systemctl', '--no-legend', '--no-pager', '--full', @opts)) { my ($name) = m!^(\S+)\.service\s+loaded!; ($name) = m!^(\S+)\.service\s+enabled! if $::isInstall && !$name; -- cgit v1.2.1