Last active
April 15, 2019 10:19
-
-
Save Waltibaba/7e3c5b340ad6d1d81161870459419e22 to your computer and use it in GitHub Desktop.
/etc/pacman.d/hooks/. - pacman hooks for not killing the system when there's a kernel update.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/etc/pacman.d/hooks/backup-modules.hook | |
[Trigger] | |
Operation = Upgrade | |
Operation = Remove | |
Type = Package | |
Target = linux | |
[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 || :' | |
/etc/pacman.d/hooks/upgrade-backup-modules.hook | |
[Trigger] | |
Operation = Remove | |
Operation = Upgrade | |
Type = Package | |
Target = linux | |
[Action] | |
Depends = coreutils | |
Depends = bash | |
When = PostTransaction | |
Exec = /usr/bin/bash -c '[[ -d /usr/lib/modules/$(uname -r) ]] || ln -s /tmp/$(uname -r) /usr/lib/modules/$(uname -r)' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment