SpectreOS-old/pacman-hooks/backup-modules-pre.hook
2018-07-17 23:26:31 +02:00

13 lines
328 B
Text

[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 || :'