diff --git a/dovecot/dovecot-lib.pl b/dovecot/dovecot-lib.pl index 033e1878d..0c42297c9 100755 --- a/dovecot/dovecot-lib.pl +++ b/dovecot/dovecot-lib.pl @@ -321,6 +321,21 @@ foreach my $c (@$conf) { } } +# renumber_section_and_members(&conffull, file, line, offset, member_sname, member_svalue) +sub renumber_section_and_members +{ +my ($conffull, $file, $line, $offset, $member_sname, $member_svalue) = @_; +my @section = &find_section($sname, $conffull); +if ($member_sname || $member_svalue) { + @section = grep { + ($_->{'members'}->[0]->{'sectionname'} eq $member_sname || !defined($member_sname)) && + ($_->{'members'}->[0]->{'sectionvalue'} eq $member_svalue || !defined($member_svalue)) && + $_->{'members'}->[0]->{'file'} eq $file + } @section; + } +&renumber(\@section, $line, $file, $offset); +} + # is_dovecot_running() # Returns the PID if the server process is active, undef if not sub is_dovecot_running diff --git a/proc/linux-lib.pl b/proc/linux-lib.pl index a840ce894..845f2a3b0 100755 --- a/proc/linux-lib.pl +++ b/proc/linux-lib.pl @@ -512,9 +512,10 @@ if (&has_command("sensors")) { $a = 0 if (/^\s*$/); # Device has either fan or voltage data (sign of CPU) $a = 1 if (/fan[\d+]:\s+[0-9]+\s+RPM/i || - /in[\d+]:\s+[\+\-0-9\.]+\s+V/i); - # Get odd output like in #1253 - if ($a && /temp(\d+):\s+([\+\-][0-9\.]+)\s+.*?[=+].*?\)/) { + /in[\d+]:\s+[\+\-0-9\.]+\s+V/i || + /cpu_thermal-virtual-[\d]+/i); + # Get odd output like in #1253 #1280 + if ($a && /temp(\d+):\s+([\+\-][0-9\.]+)/) { # Adjust to start from `0` as all other outputs push(@rv, { 'core' => (int($1) - 1), 'temp' => $2 }); diff --git a/ui-lib.pl b/ui-lib.pl index 5a239ca7b..165a25259 100755 --- a/ui-lib.pl +++ b/ui-lib.pl @@ -1013,8 +1013,8 @@ if (!defined($width)) { $width = "200"; } my $wstyle = $width ? "style='width:$width'" : ""; -my ($caller_package, $caller_file) = caller; -if ($caller_file eq $0 && !$main::ui_multi_select_donejs++) { + +if (!$main::ui_multi_select_donejs++) { $rv .= &ui_multi_select_javascript(); } $rv .= "