Fix reverse flag going to the command line #2473

This commit is contained in:
Ilia Ross
2025-05-15 11:31:00 +03:00
parent 3b82950571
commit afaa49591a

View File

@@ -9,8 +9,14 @@ require './logviewer-lib.pl';
# Send headers
print "Content-Type: text/plain\n\n";
# Follow and reverse are mutually exclusive
my @systemctl_cmds;
{
local $config{'reverse'} = 0;
@systemctl_cmds = &get_systemctl_cmds(1);
}
# System log to follow
my @systemctl_cmds = &get_systemctl_cmds(1);
my ($log) = grep { $_->{'id'} eq $in{'idx'} } @systemctl_cmds;
if (!&can_edit_log($log) ||
!$log->{'cmd'} ||