SpectreOS/configs/pacman-hooks/backup-modules-pre.hook
2022-10-04 19:01:31 +02:00

13 lines
328 B
Text
Executable file

[Trigger]
Operation = Upgrade
Operation = Remove
Type = Package
Target = linux
Target = linux-hardened
Target = linux-mainline
[Action]
Depends = coreutils
Depends = bash
When = PreTransaction
Exec = /usr/bin/bash -c 'find /usr/lib/modules -maxdepth 1 -type l -delete; cp -a /usr/lib/modules/$(uname -r) /tmp 2>/dev/null || :'