From 29da8ea3d0b6997949ea8343fab4ee1a0dbe9a9b Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Fri, 12 Jul 2024 17:22:19 -0700 Subject: [PATCH] Clarify what kind of update it is https://forum.virtualmin.com/t/security-updates-being-auto-installed-regardles-of-software-scheduled-upgrades-set-to-just-notify/127852 --- package-updates/update.pl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/package-updates/update.pl b/package-updates/update.pl index ebd5f332c..f32ca4148 100755 --- a/package-updates/update.pl +++ b/package-updates/update.pl @@ -19,17 +19,18 @@ $tellcount = 0; &start_update_progress([ map { $_->{'name'} } @todo ]); foreach $t (@todo) { next if ($already{$t->{'update'}}); + my $umsg = $t->{'security'} ? "security update" : "update"; if ($config{'sched_action'} == 2 || $config{'sched_action'} == 1 && $t->{'security'}) { # Can install - $body .= "An update to $t->{'name'} from $t->{'oldversion'} to $t->{'version'} is needed.\n"; + $body .= "An $umsg to $t->{'name'} from $t->{'oldversion'} to $t->{'version'} is needed.\n"; ($out, $done) = &capture_function_output( \&package_install, $t->{'update'}); if (@$done) { - $body .= "This update has been successfully installed.\n\n"; + $body .= "This $umsg has been successfully installed.\n\n"; } else { - $body .= "However, this update could not be installed! Try the update manually\nusing the Package Updates module.\n\n"; + $body .= "However, this $usmg could not be installed! Try the update manually\nusing the Package Updates module.\n\n"; } foreach $p (@$done) { $already{$p}++; @@ -39,7 +40,7 @@ foreach $t (@todo) { $config{'sched_action'} == 0 || $config{'sched_action'} == -1 && $t->{'security'}) { # Just tell the user about it - $body .= "An update to $t->{'name'} from $t->{'oldversion'} to $t->{'version'} is available.\n\n"; + $body .= "An $umsg to $t->{'name'} from $t->{'oldversion'} to $t->{'version'} is available.\n\n"; $tellcount++; } }