diff options
author | Pascal Terjan <pterjan@mageia.org> | 2020-08-07 20:19:00 +0000 |
---|---|---|
committer | Pascal Terjan <pterjan@mageia.org> | 2020-08-07 20:19:55 +0000 |
commit | 4846df45d24880a8b4d0ca82b2d179b17b4e80c2 (patch) | |
tree | 4d13633bec39ec5f0747db82d82e938d1fc36e00 | |
parent | 5f6ce9e4f048f998a2877e5e02c25c41770deed9 (diff) | |
download | drakx-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)
-rw-r--r-- | perl-install/NEWS | 2 | ||||
-rw-r--r-- | perl-install/services.pm | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS index a78f8968b..3905e08f5 100644 --- a/perl-install/NEWS +++ b/perl-install/NEWS @@ -1,3 +1,5 @@ +- add --plain to systemctl list-units, else it adds some characters at + the beginning of the line since systemd 246 (mga#27046) - recognize new kernel 5.5 - 5.7 drivers Version 18.32 - 27 June 2020 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; |