pve-kernel.postinst.in 610 B

12345678910111213141516171819202122232425
  1. #!/usr/bin/perl -w
  2. use strict;
  3. # Ignore all invocations except when called on to configure.
  4. exit 0 unless $ARGV[0] =~ /configure/;
  5. # do nothing if run from proxmox installer
  6. exit 0 if -e "/proxmox_install_mode";
  7. my $imagedir = "/boot";
  8. my $version = "@@KVNAME@@";
  9. system("depmod $version");
  10. if (-d "/etc/kernel/postinst.d") {
  11. print STDERR "Examining /etc/kernel/postinst.d.\n";
  12. system ("run-parts --verbose --exit-on-error --arg=$version " .
  13. "--arg=$imagedir/vmlinuz-$version " .
  14. "/etc/kernel/postinst.d") &&
  15. die "Failed to process /etc/kernel/postinst.d";
  16. }
  17. exit 0