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