Last active
April 27, 2024 06:20
-
-
Save cirrusUK/aa50bcae03154a246fdc9f108dbc3fc1 to your computer and use it in GitHub Desktop.
/etc/pacman.d/hooks
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
[Trigger] | |
Operation = Upgrade | |
Type = Package | |
Target = pacman-mirrorlist | |
[Action] | |
Description = Updating pacman-mirrorlist with reflector and removing pacnew... | |
When = PostTransaction | |
Depends = reflector | |
Exec = /usr/bin/env sh -c "reflector --protocol https --country 'Ireland' --latest 30 --number 10 --sort rate --save /etc/pacman.d/mirrorlist; if [[ -f /etc/pacman.d/mirrorlist.pacnew ]]; then rm /etc/pacman.d/mirrorlist.pacnew; fi" |
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
[Trigger] | |
Operation = Remove | |
Operation = Install | |
Operation = Upgrade | |
Type = Package | |
Target = * | |
##Since pacman 5.1.0-1 this hook requires pacman-contrib pkg | |
[Action] | |
Description = Keep the last cache and the currently installed. | |
When = PostTransaction | |
Exec = /usr/bin/paccache -rvk2 |
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
[Trigger] | |
Operation = Install | |
Operation = Upgrade | |
Operation = Remove | |
Type = File | |
Target = usr/lib/modules/* | |
[Action] | |
Description = Check for upgrade of running kernel | |
When = PostTransaction | |
Exec = /bin/bash -c "[[ -f \"/proc/modules\" && ! -d \"/usr/lib/modules/$(uname -r)\" ]] && printf '==> WARNING: %s\n -> %s\n' 'Running kernel has been updated or removed.' 'Reboot to the new kernel is required.'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment