]> git.proxmox.com Git - pve-kernel.git/blame - debian/proxmox-kernel.prerm.in
bump version to 6.2.16-12
[pve-kernel.git] / debian / proxmox-kernel.prerm.in
CommitLineData
920c82fb 1#!/usr/bin/perl
ba2f1a67
FG
2
3use strict;
920c82fb 4use warnings;
ba2f1a67
FG
5
6# Ignore all invocations uxcept when called on to remove
7exit 0 unless ($ARGV[0] && $ARGV[0] =~ /remove/) ;
8
9# do nothing if run from proxmox installer
10exit 0 if -e "/proxmox_install_mode";
11
12my $imagedir = "/boot";
13
14my $version = "@@KVNAME@@";
15
16if (-d "/etc/kernel/prerm.d") {
17 print STDERR "Examining /etc/kernel/prerm.d.\n";
920c82fb
TL
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";
ba2f1a67
FG
21}
22
23exit 0