SpectreOS/configs/pacman-hooks/backup-modules-pre.hook

14 lines
328 B
Text
Raw Normal View History

2022-10-04 19:01:31 +02:00
[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 || :'