fixed non-existent issue with 'systemd_unit_file[]'
This commit is contained in:
parent
9197f84f3d
commit
87d2f90dfc
|
@ -198,13 +198,16 @@ if ($debug) {
|
||||||
if ($json) {
|
if ($json) {
|
||||||
require JSON;
|
require JSON;
|
||||||
# tidy up some of the "object" variables
|
# tidy up some of the "object" variables
|
||||||
my @sduf = @{$lynis_report_data{'systemd_unit_file[]'}};
|
my @sduf;
|
||||||
my @sduf_new;
|
if ((ref($lynis_report_data{'systemd_unit_file[]'}) eq 'ARRAY') and ($lynis_report_data{'systemd_unit_file[]'} ne 'NA')) {
|
||||||
foreach my $uf ( @sduf ) {
|
@sduf = @{$lynis_report_data{'systemd_unit_file[]'}};
|
||||||
my ($name,$status) = split(/\|/, $uf);
|
my @sduf_new;
|
||||||
push @sduf_new, { 'name' => $name, 'state' => $status };
|
foreach my $uf ( @sduf ) {
|
||||||
|
my ($name,$status) = split(/\|/, $uf);
|
||||||
|
push @sduf_new, { 'name' => $name, 'state' => $status };
|
||||||
|
}
|
||||||
|
$lynis_report_data{'systemd_unit_file[]'} = \@sduf_new;
|
||||||
}
|
}
|
||||||
$lynis_report_data{'systemd_unit_file[]'} = \@sduf_new;
|
|
||||||
my @ipa = @{$lynis_report_data{'installed_packages_array'}};
|
my @ipa = @{$lynis_report_data{'installed_packages_array'}};
|
||||||
my @ipa_new;
|
my @ipa_new;
|
||||||
foreach my $pkg ( @ipa ) {
|
foreach my $pkg ( @ipa ) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user