aboutsummarylogtreecommitdiffstats
path: root/10-linux-modules-pre.hook
blob: 34e7221feb650373402fa739060faa078a5e08ce (plain)
1
2
3
4
5
6
7
8
9
10
11
[Trigger]
Operation = Install
Operation = Upgrade
Type = Path
Target = usr/lib/modules/*/vmlinuz

[Action]
Description = Saving Linux kernel modules...
When = PreTransaction
Depends = rsync
Exec = /bin/sh -c 'KVER="${KVER:-$(uname -r)}"; if test -e "/usr/lib/modules/${KVER}"; then rsync -AHXal --delete-after "/usr/lib/modules/${KVER}" /usr/lib/modules/backup/; fi'