summaryrefslogtreecommitdiffstats
path: root/perl-install/services.pm
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mageia.org>2020-08-07 20:19:00 +0000
committerPascal Terjan <pterjan@mageia.org>2020-08-07 20:19:55 +0000
commit4846df45d24880a8b4d0ca82b2d179b17b4e80c2 (patch)
tree4d13633bec39ec5f0747db82d82e938d1fc36e00 /perl-install/services.pm
parent5f6ce9e4f048f998a2877e5e02c25c41770deed9 (diff)
downloaddrakx-4846df45d24880a8b4d0ca82b2d179b17b4e80c2.tar
drakx-4846df45d24880a8b4d0ca82b2d179b17b4e80c2.tar.gz
drakx-4846df45d24880a8b4d0ca82b2d179b17b4e80c2.tar.bz2
drakx-4846df45d24880a8b4d0ca82b2d179b17b4e80c2.tar.xz
drakx-4846df45d24880a8b4d0ca82b2d179b17b4e80c2.zip
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)
Diffstat (limited to 'perl-install/services.pm')
-rw-r--r--perl-install/services.pm2
1 files changed, 1 insertions, 1 deletions
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;