summarylogtreecommitdiffstats
path: root/90-kernel-install-remove.hook
blob: 223251a8e8bd71a2cfecb5b966f1bfe579a95535 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
[Trigger]
Operation = Upgrade
Operation = Remove
Type = File
Target = usr/lib/modules/*/vmlinuz

[Action]
Description = Removing kernel and initrd from $BOOT (kernel-install)
When = PreTransaction
Exec = /bin/bash -c 'while read -r vmlinuz; do : && kver="$(basename "$(dirname "$vmlinuz")")" && echo + kernel-install remove "$kver" && kernel-install -v remove "$kver" | sed "/^\+/d"; done'
Depends = bash
Depends = systemd
NeedsTargets