Created
June 30, 2019 12:24
-
-
Save ulidtko/1d515c523ecdd1f79ac21b78c96626f8 to your computer and use it in GitHub Desktop.
Keep Arch Linux fully functional after kernel updates
This file contains hidden or 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/tmpfiles.d/kmod-fridge-cleanup.conf | |
#Type Path Mode User Group Age Argument | |
D! /lib/modules/fridge 0755 root root - | |
#-- Inspired by #archlinux IRC & this thread: | |
# https://www.reddit.com/r/archlinux/comments/4zrsc3/keep_your_system_fully_functional_after_a_kernel/ | |
# | |
#-- ulidtko, June 2019 [File 3/3] |
This file contains hidden or 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/kmod-update-post.hook | |
[Trigger] | |
Type = Package | |
Target = linux{,-lts,-clear} | |
Operation = Upgrade | |
[Action] | |
Description = Revive current kernel's kmods wiped by the cruel pacman | |
When = PostTransaction | |
Exec = /bin/sh -c 'test -e "/lib/modules/fridge/$(uname -r)" && ln -sf fridge/$(uname -r) /lib/modules/$(uname -r)' | |
Depends = coreutils | |
#-- Inspired by #archlinux IRC & this thread: | |
# https://www.reddit.com/r/archlinux/comments/4zrsc3/keep_your_system_fully_functional_after_a_kernel/ | |
# | |
#-- ulidtko, June 2019 [File 2/3] |
This file contains hidden or 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/kmod-update-pre.hook | |
[Trigger] | |
Type = Package | |
Target = linux{,-lts,-clear} | |
Operation = Upgrade | |
Operation = Remove | |
[Action] | |
Description = Save current kernel's kmods | |
When = PreTransaction | |
Exec = /bin/sh -c 'test -e "/lib/modules/fridge/$(uname -r)" || cp -a "/lib/modules/$(uname -r)" /lib/modules/fridge/' | |
Depends = coreutils | |
#-- Inspired by #archlinux IRC & this thread: | |
# https://www.reddit.com/r/archlinux/comments/4zrsc3/keep_your_system_fully_functional_after_a_kernel/ | |
# | |
#-- ulidtko, June 2019 [File 1/3] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment