aboutsummarylogtreecommitdiffstats
path: root/10-linux-modules-pre.hook
blob: 257f5f5ac039c7ac9d1aa7fccfa330a1eab4d1e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
[Trigger]
Operation = Upgrade
Type = Package
Target = linux
Target = linux-hardened
Target = linux-lts
Target = linux-zen


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