]> git.proxmox.com Git - pve-kernel.git/blob - debian/proxmox-kernel.prerm.in
bump version to 6.2.16-12
[pve-kernel.git] / debian / proxmox-kernel.prerm.in
1 #!/usr/bin/perl
2
3 use strict;
4 use warnings;
5
6 # Ignore all invocations uxcept when called on to remove
7 exit 0 unless ($ARGV[0] && $ARGV[0] =~ /remove/) ;
8
9 # do nothing if run from proxmox installer
10 exit 0 if -e "/proxmox_install_mode";
11
12 my $imagedir = "/boot";
13
14 my $version = "@@KVNAME@@";
15
16 if (-d "/etc/kernel/prerm.d") {
17 print STDERR "Examining /etc/kernel/prerm.d.\n";
18 system(
19 "run-parts --verbose --exit-on-error --arg=$version --arg=$imagedir/vmlinuz-$version /etc/kernel/prerm.d"
20 ) && die "Failed to process /etc/kernel/prerm.d";
21 }
22
23 exit 0