summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiancarlo Razzolini <grazzolini@archlinux.org>2019-10-15 04:28:04 +0200
committerGiancarlo Razzolini <grazzolini@archlinux.org>2019-10-15 04:28:04 +0200
commitf949879ce6de354e02e06daa81e9257fdab07699 (patch)
tree1fecbf2ebcce7648aee8ab2fa630fb0d7095cdff
parent9c1e0f3dd01151b79e9b557ea8510605616c1369 (diff)
downloadmkinitcpio-f949879ce6de354e02e06daa81e9257fdab07699.tar.gz
mkinitcpio-f949879ce6de354e02e06daa81e9257fdab07699.tar.xz
Add a remove hook
This hook triggers when a kernel is removed or when the mkinitcpio package itself is being removed.
-rw-r--r--libalpm/hooks/60-mkinitcpio-remove.hook15
1 files changed, 15 insertions, 0 deletions
diff --git a/libalpm/hooks/60-mkinitcpio-remove.hook b/libalpm/hooks/60-mkinitcpio-remove.hook
new file mode 100644
index 0000000..ba2b649
--- /dev/null
+++ b/libalpm/hooks/60-mkinitcpio-remove.hook
@@ -0,0 +1,15 @@
+[Trigger]
+Type = File
+Operation = Remove
+Target = usr/lib/modules/*/vmlinuz
+
+[Trigger]
+Type = Package
+Operation = Remove
+Target = mkinitcpio
+
+[Action]
+Description = Removing linux initcpios...
+When = PostTransaction
+Exec = /usr/share/libalpm/scripts/mkinitcpio-remove
+NeedsTargets