Skip to content

Commit

Permalink
pdist: Do not delete running kernel
Browse files Browse the repository at this point in the history
Add excludes on the client for the Linux version specific files and
directories of the running kernel. This prevents the running kernel
from being deleted on the client in case it is not installed on the
distmaster.

This can be usefull for kernel testing. Also it prevents errors, when we
by mistake purge a kernel from the distmaster which is still in use.

Notes:

- The excludes just prevent files from being deleted, not from being
replaced.

- If we want to disable a loadable module (e.g. because we learned about a
security problem with it and don't need it), we can't just delete the
.ko file and trust pdist to delete it on the clients as well. We can
replace it by an empty file instead.

- The script doesn't keep the bee index, bee cache or the grub menu from
being updated.
  • Loading branch information
donald committed Oct 7, 2019
1 parent ce889c4 commit baec330
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions pdist/pdist
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,20 @@ sub prog_update

local($, , $\)=(' ',"\n");

if ($function == F_UPDATE) {
chomp (my $linux_version=`uname -r`); # '5.4.0-rc2.mx64.295'
if ($linux_version) {
my ($build) = $linux_version =~ /\.(\d+)$/;
push @EXCEPTS,
"/boot/mariux.$build",
"/boot/bzImage-$linux_version",
"/lib/modules/$linux_version",
"/boot/config-$linux_version",
"/boot/System.map-$linux_version",
"/usr/share/nvidia/kernel/$linux_version",
}
}

if ($tarfile && $tarfile ne '-') {
-d $TMPDIR or mkdir $TMPDIR or die $TMPDIR.": $!\n";
if (-d $TMPUPDDIR) {
Expand Down

0 comments on commit baec330

Please sign in to comment.