Compare commits

...

2 Commits

Author SHA1 Message Date
4d23f4ada3 feat(pve-manager.spec): new update-kernel dependency
Added a new dependency required for the 'pveupgrade' script to work.
2024-11-08 12:40:49 +03:00
3bc3c5d5bb feat(pveupgrade): adding a kernel update
Added removal of old kernels and installation of new kernel versions.'update-kernel' checks if the new kernel is installed correctly and displays a message asking to reboot the system.
2024-11-08 12:09:29 +03:00
2 changed files with 7 additions and 13 deletions

View File

@ -59,20 +59,13 @@ if (!$st || (time() - $st->mtime) > (3*24*3600)) {
print "Your System is up-to-date\n\n";
}
my $newkernel;
foreach my $p (@$oldlist) {
if (($p->{Package} =~ m/^(?:pve|proxmox)-kernel/) &&
!grep { $_->{Package} eq $p->{Package} } @$pkglist) {
$newkernel = 1;
last;
}
}
print "Removing old kernels...\n";
system('remove-old-kernels');
if ($newkernel) {
print "\n";
print "Seems you installed a kernel update - Please consider rebooting\n" .
"this node to activate the new kernel.\n\n";
}
print "Updating kernel and modules...\n";
# Inside checks for kernel installation and asks for a reboot
system('update-kernel');
}

View File

@ -47,6 +47,7 @@ BuildRequires: pve-acme pve-http-server >= 5.1.1 pve-access-control >= 8.1.3
BuildRequires: proxmox-widget-toolkit >= 4.2.0
BuildRequires: perl(AptPkg/Cache.pm) perl(File/ReadBackwards.pm) perl(Template.pm) perl(Net/DNS/Resolver.pm)
BuildRequires: unzip gnupg
BuildRequires: update-kernel
%description
This package contains the PVE management tools