pveupdate - always run check for available updates

This commit is contained in:
Dietmar Maurer 2017-12-21 10:15:47 +01:00
parent 26031ab15f
commit d916c09d2b

View File

@ -42,15 +42,13 @@ if (my $err = $@) {
syslog ('err', "update appliance info failed - see /var/log/pveam.log for details");
}
if (my $info = PVE::INotify::read_file('subscription')) {
# We assume that users with subscriptions want informations
# about new packages.
if ($info->{status} eq 'Active') {
eval { PVE::API2::APT->update_database({ node => $nodename, notify => 1, quiet => 1 }); };
if (my $err = $@) {
syslog ('err', "update apt database failed: $err");
}
}
my $info = PVE::INotify::read_file('subscription');
# We assume that users with subscriptions want informations
# about new packages.
my $notify = ($info && $info->{status} eq 'Active') ? 1 : 0;
eval { PVE::API2::APT->update_database({ node => $nodename, notify => $notify, quiet => 1 }); };
if (my $err = $@) {
syslog ('err', "update apt database failed: $err");
}
sub cleanup_tasks {